Skip to content

[WIP] Nexus Wannier90 Interface #5385

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nexus/lib/nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from quantum_package import QuantumPackage,QuantumPackageInput,QuantumPackageAnalyzer,generate_quantum_package_input,generate_quantum_package
from pyscf_sim import Pyscf, PyscfInput, PyscfAnalyzer, generate_pyscf_input, generate_pyscf
from rmg import Rmg, RmgInput, RmgAnalyzer, generate_rmg_input, generate_rmg
from wannier90 import Wannier90Input

from qmcpack_converters import Pw2qmcpack , Pw2qmcpackInput , Pw2qmcpackAnalyzer , generate_pw2qmcpack_input , generate_pw2qmcpack
from qmcpack_converters import Convert4qmc, Convert4qmcInput, Convert4qmcAnalyzer, generate_convert4qmc_input, generate_convert4qmc
Expand Down
60 changes: 60 additions & 0 deletions nexus/lib/pwscf_postprocessors.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,19 @@
# SimulationInput class for pwexport. #
# #
# #
# generate_pw2wan90 #
# User-facing function to create pw2wannier90 simulation objects. #
# #
# generate_pw2wan90_input #
# User-facing function to create input for pw2wannier90. #
# #
# Pw2wan90 #
# Simulation class for pw2wannier90. #
# #
# Pw2wan90Input #
# SimulationInput class for pw2wannier90. #
# #
# #
# NamelistInput #
# Generic SimulationInput class to handle Fortran namelists. #
# Base class for all *Input classes listed above. #
Expand Down Expand Up @@ -1045,6 +1058,52 @@ def generate_hp(**kwargs):



class Pw2wan90Namelist(Namelist):
namelist = 'inputpp'
names = ['prefix','outdir','seedname','spin_component','wan_mode','write_mmn','write_amn',
'write_unk','write_dmn','read_unk','reduce_unk','reduce_unk_factor','wvfn_formatted',
'write_unkg','write_uHu','write_uIu','write_spn','spn_formatted','uHu_formatted',
'uIu_formatted','write_sHu','sHu_formatted','write_sIu','sIu_formatted',
'regular_mesh','plot_bands','check_complex','irr_bz','read_sym',
'auto_projections','atom_proj','atom_proj_exclude','atom_proj_ext',
'atom_proj_dir','atom_proj_ortho','scdm_proj','scdm_entanglement','scdm_mu',
'scdm_sigma','scdm_depth']
#end class Pw2wan90Namelist


class Pw2wan90Input(NamelistInput):
namelists = ['inputpp']
namelist_classes = obj(
inputpp = Pw2wan90Namelist
)
#end class Pw2wan90Input


class Pw2wan90(PostProcessSimulation):
input_type = Pw2wan90Input
generic_identifier = 'pw2wan90'
application = 'pw2wannier90.x'
#end class Pw2wan90


def generate_pw2wan90_input(prefix='pwscf',outdir='pwscf_output',seedname='wannier',**vals):
pw2wan90_input = Pw2wan90Input()
pw2wan90_input.inputpp.prefix = prefix
pw2wan90_input.inputpp.outdir = outdir
pw2wan90_input.inputpp.seedname = seedname
pw2wan90_input.inputpp.assign_values('values',**vals)
return pw2wan90_input
#end def generate_pw2wan90_input


def generate_pw2wan90(**kwargs):
sim_args,inp_args = separate_inputs(kwargs,copy_args=True)
pw2wan90 = Pw2wan90(**sim_args)
pw2wan90.input = generate_pw2wan90_input(**inp_args)
return pw2wan90
#end def generate_pw2wan90




namelist_classes = [
Expand All @@ -1056,6 +1115,7 @@ def generate_hp(**kwargs):
CpppInputppNamelist , CpppInput,
PwexportInputppNamelist, PwexportInput,
HpNamelist , HpInput,
Pw2wan90Namelist , Pw2wan90Input,
]
for cls in namelist_classes:
cls.class_init()
Expand Down
10 changes: 10 additions & 0 deletions nexus/lib/wannier90.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from wannier90_input import Wannier90Input


class Wannier90(Simulation):
input_type = Wannier90Input
# analyzer_type = Wannier90Analyzer
generic_identifier = 'wannier90'
infile_extension = '.win'
application = 'wannier90'
application_properties = set(['serial','omp','mpi'])
Loading
Loading