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

bug fix #650

Merged
merged 2 commits into from
Feb 24, 2022
Merged
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
13 changes: 8 additions & 5 deletions dpgen/generator/lib/pwscf.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,14 @@ def _make_pwscf_04_kpoints(sys_data, kspacing):
kpoints = [(np.ceil(2 * np.pi * np.linalg.norm(ii) / kspacing).astype(int))
for ii in rcell]
ret = ""
ret += "K_POINTS { automatic }\n"
for ii in range(3) :
ret += "%d " % kpoints[ii]
for ii in range(3) :
ret += "%d " % _kshift(kpoints[ii])
if kpoints == [1,1,1]:
ret += "K_POINTS gamma"
else:
ret += "K_POINTS { automatic }\n"
for ii in range(3) :
ret += "%d " % kpoints[ii]
for ii in range(3) :
ret += "%d " % _kshift(kpoints[ii])
ret += "\n"
return ret

Expand Down
2 changes: 2 additions & 0 deletions dpgen/generator/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ def make_train (iter_index,
if jinput['model']['descriptor']['type'] == 'hybrid':
for desc in jinput['model']['descriptor']['list']:
desc['seed'] = random.randrange(sys.maxsize) % (2**32)
elif jinput['model']['descriptor']['type'] == 'loc_frame':
pass
else:
jinput['model']['descriptor']['seed'] = random.randrange(sys.maxsize) % (2**32)
jinput['model']['fitting_net']['seed'] = random.randrange(sys.maxsize) % (2**32)
Expand Down