Skip to content
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

Nexus: add delay_rank input #3218

Merged
merged 2 commits into from
Jun 3, 2021
Merged
Changes from 1 commit
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
17 changes: 14 additions & 3 deletions nexus/lib/qmcpack_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -1939,7 +1939,7 @@ class radfunc(QIxml):
#end class radfunc

class slaterdeterminant(QIxml):
attributes = ['optimize']
attributes = ['optimize','delay_rank']
elements = ['determinant']
write_types = obj(optimize=yesno)
#end class slaterdeterminant
Expand Down Expand Up @@ -4677,6 +4677,7 @@ def generate_determinantset(up = 'u',
spo_up = 'spo_u',
spo_down = 'spo_d',
spin_polarized = False,
delay_rank = None,
system = None
):
if system is None:
Expand Down Expand Up @@ -4710,6 +4711,9 @@ def generate_determinantset(up = 'u',
)
)
)
if delay_rank is not None:
dset.slaterdeterminant.delay_rank = delay_rank
#end if
return dset
#end def generate_determinantset

Expand All @@ -4724,6 +4728,7 @@ def generate_determinantset_old(type = 'bspline',
source = 'ion0',
href = 'MISSING.h5',
excitation = None,
delay_rank = None,
system = None
):
if system is None:
Expand Down Expand Up @@ -4760,9 +4765,9 @@ def generate_determinantset_old(type = 'bspline',
)
)
)
if twist!=None:
if twist is not None:
dset.twistnum = system.structure.select_twist(twist)
elif twistnum!=None:
elif twistnum is not None:
dset.twistnum = twistnum
elif len(system.structure.kpoints)==1:
dset.twistnum = 0
Expand All @@ -4776,6 +4781,9 @@ def generate_determinantset_old(type = 'bspline',
dset.hybridrep = yesno_dict[hybridrep]
#end if
#end if
if delay_rank is not None:
dset.slaterdeterminant.delay_rank = delay_rank
#end if
if excitation is not None:
format_failed = False
if not isinstance(excitation,(tuple,list)):
Expand Down Expand Up @@ -6823,6 +6831,7 @@ def generate_qmcpack_input(**kwargs):
system = 'missing',
pseudos = None,
dla = None,
delay_rank = None,
jastrows = 'generateJ12',
interactions = 'all',
corrections = 'default',
Expand Down Expand Up @@ -7002,6 +7011,7 @@ def generate_basic_input(**kwargs):

dset = generate_determinantset(
spin_polarized = kw.spin_polarized,
delay_rank = kw.delay_rank,
system = kw.system,
)
elif kw.det_format=='old':
Expand All @@ -7018,6 +7028,7 @@ def generate_basic_input(**kwargs):
href = kw.orbitals_h5,
spin_polarized = kw.spin_polarized,
excitation = kw.excitation,
delay_rank = kw.delay_rank,
system = kw.system,
)
else:
Expand Down