-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* enable restart with consistent rho and VHartree --------- Co-authored-by: Seung Whan Chung <[email protected]>
- Loading branch information
1 parent
77bd87e
commit 8b84de4
Showing
12 changed files
with
430 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
3 | ||
|
||
O 0.00 0.00 0.00 | ||
H -0.76 0.59 0.00 | ||
H 0.76 0.59 0.00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
verbosity=2 | ||
xcFunctional=PBE | ||
FDtype=4th | ||
[Mesh] | ||
nx=48 | ||
ny=48 | ||
nz=48 | ||
[Domain] | ||
ox=-4.5 | ||
oy=-4.5 | ||
oz=-4.5 | ||
lx=9. | ||
ly=9. | ||
lz=9. | ||
[Potentials] | ||
pseudopotential=pseudo.O_ONCV_PBE_SG15 | ||
pseudopotential=pseudo.H_ONCV_PBE_SG15 | ||
[Run] | ||
type=MD | ||
[MD] | ||
num_steps=5 | ||
dt=40. | ||
[Quench] | ||
max_steps=24 | ||
atol=1.e-8 | ||
[Restart] | ||
input_level=4 | ||
input_filename=WF | ||
output_level=4 | ||
output_filename=WF_MD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
verbosity=2 | ||
xcFunctional=PBE | ||
FDtype=4th | ||
[Mesh] | ||
nx=48 | ||
ny=48 | ||
nz=48 | ||
[Domain] | ||
ox=-4.5 | ||
oy=-4.5 | ||
oz=-4.5 | ||
lx=9. | ||
ly=9. | ||
lz=9. | ||
[Potentials] | ||
pseudopotential=pseudo.O_ONCV_PBE_SG15 | ||
pseudopotential=pseudo.H_ONCV_PBE_SG15 | ||
[Run] | ||
type=QUENCH | ||
[Quench] | ||
max_steps=120 | ||
atol=1.e-8 | ||
[Orbitals] | ||
initial_type=Random | ||
initial_width=1.5 | ||
[Restart] | ||
output_level=4 | ||
output_filename=WF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
verbosity=2 | ||
xcFunctional=PBE | ||
FDtype=4th | ||
[Mesh] | ||
nx=48 | ||
ny=48 | ||
nz=48 | ||
[Domain] | ||
ox=-4.5 | ||
oy=-4.5 | ||
oz=-4.5 | ||
lx=9. | ||
ly=9. | ||
lz=9. | ||
[Potentials] | ||
pseudopotential=pseudo.O_ONCV_PBE_SG15 | ||
pseudopotential=pseudo.H_ONCV_PBE_SG15 | ||
[Run] | ||
type=QUENCH | ||
[Quench] | ||
max_steps=24 | ||
atol=1.e-8 | ||
[Restart] | ||
input_level=4 | ||
input_filename=WF_MD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
#!/usr/bin/env python | ||
import sys | ||
import os | ||
import subprocess | ||
import string | ||
|
||
print("Test test_rho_restart...") | ||
|
||
nargs=len(sys.argv) | ||
|
||
mpicmd = sys.argv[1]+" "+sys.argv[2]+" "+sys.argv[3] | ||
for i in range(4,nargs-7): | ||
mpicmd = mpicmd + " "+sys.argv[i] | ||
print("MPI run command: {}".format(mpicmd)) | ||
|
||
mgmol_exe = sys.argv[nargs-7] | ||
test_exe = sys.argv[nargs-6] | ||
input1 = sys.argv[nargs-5] | ||
input2 = sys.argv[nargs-4] | ||
input3 = sys.argv[nargs-3] | ||
coords = sys.argv[nargs-2] | ||
print("coordinates file: %s"%coords) | ||
|
||
#create links to potentials files | ||
dst1 = 'pseudo.H_ONCV_PBE_SG15' | ||
src1 = sys.argv[-1] + '/' + dst1 | ||
|
||
dst2 = 'pseudo.O_ONCV_PBE_SG15' | ||
src2 = sys.argv[-1] + '/' + dst2 | ||
|
||
if not os.path.exists(dst1): | ||
print("Create link to %s"%dst1) | ||
os.symlink(src1, dst1) | ||
|
||
if not os.path.exists(dst2): | ||
print("Create link to %s"%dst2) | ||
os.symlink(src2, dst2) | ||
|
||
#run mgmol to generate initial ground state | ||
command = "{} {} -c {} -i {}".format(mpicmd,mgmol_exe,input1,coords) | ||
print("Run command: {}".format(command)) | ||
|
||
output = subprocess.check_output(command,shell=True) | ||
lines=output.split(b'\n') | ||
|
||
flag=0 | ||
for line in lines: | ||
if line.count(b'Run ended'): | ||
flag=1 | ||
|
||
if flag==0: | ||
print("Initial quench failed to complete!") | ||
sys.exit(1) | ||
|
||
#run MD | ||
command = "{} {} -c {} -i {}".format(mpicmd,mgmol_exe,input2,coords) | ||
print("Run command: {}".format(command)) | ||
output = subprocess.check_output(command,shell=True) | ||
lines=output.split(b'\n') | ||
|
||
flag=0 | ||
for line in lines: | ||
if line.count(b'Run ended'): | ||
flag=1 | ||
|
||
if flag==0: | ||
print("MD failed to complete!") | ||
sys.exit(1) | ||
|
||
#run test | ||
command = "{} {} -c {} -i {}".format(mpicmd,test_exe,input3,coords) | ||
print("Run command: {}".format(command)) | ||
output = subprocess.check_output(command,shell=True) | ||
lines=output.split(b'\n') | ||
for line in lines: | ||
print(line) | ||
|
||
print("Test SUCCESSFUL!") | ||
sys.exit(0) |
Oops, something went wrong.