-
Notifications
You must be signed in to change notification settings - Fork 15
ROM MVP solver in MD for Pinned H2O #314
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
Changes from 26 commits
1ad1292
8ac6cd6
a2ece1a
8b577ea
7ac691c
c05ba7f
bb8051d
a227c04
b263532
3eb52d6
c1d46bc
eb53963
857673f
f294d3c
98a79de
8eda83e
f298d43
c690bc5
9f1fc20
a697518
518ef00
82abde5
8a1cf05
8a26879
59b79e7
1d3a202
16a818a
bd8393a
e4b1aca
77bd87e
c03edd7
bfdc87b
8b84de4
80eb952
876e71f
0ee185a
c56463c
d5588db
f2acc8a
8003d70
4efb34c
9a4c361
32ae101
964139c
2f511b7
45a2c80
b6cf162
7fbfe13
6a1d55e
c67e63f
14eb43f
c61b48d
cd796dd
147b76c
7e40f79
867837a
962297e
5d66969
9c91516
e37983b
5c26c0d
c24bc32
89630b3
e80193b
bcad112
214213e
f8b230d
f464bab
a78e260
c4817b8
1af25da
713be2b
df7e68f
a5f6f3a
e19a870
ac6b4fe
cdd20a2
6b2b1bf
e333d54
8aaa604
6501278
0a7d07c
76ddcd7
ee4de23
79869de
18762b0
1fb9298
0616000
f9297a2
a14db57
bdbd282
90cbd47
946556a
7d75678
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| #!/bin/tcsh | ||
| #SBATCH -N 2 | ||
| #SBATCH -t 1:00:00 | ||
| #SBATCH -p pbatch | ||
|
|
||
| date | ||
|
|
||
| setenv OMP_NUM_THREADS 1 | ||
| #setenv KMP_DETERMINISTIC_REDUCTION 1 | ||
|
|
||
| set ncpus = 64 | ||
|
|
||
| set maindir = /p/lustre2/cheung26/mgmol-20250219 | ||
|
|
||
| setenv LD_LIBRARY_PATH ${maindir}/build_quartz/libROM/build/lib:$LD_LIBRARY_PATH | ||
|
|
||
| set exe = mgmol-opt | ||
|
|
||
| cp $maindir/install_quartz/bin/$exe . | ||
|
|
||
| set datadir = $maindir/examples/PinnedH2O | ||
|
|
||
| set bondlength_num_increments = 2 | ||
| set bondangle_num_increments = 2 | ||
| set num_basis = 34 | ||
|
|
||
| set cfg_rom = mgmol_rom_3DOF_${bondlength_num_increments}_${bondangle_num_increments}_${num_basis}.cfg | ||
|
|
||
| ln -s -f $maindir/potentials/pseudo.O_ONCV_PBE_SG15 . | ||
| ln -s -f $maindir/potentials/pseudo.H_ONCV_PBE_SG15 . | ||
|
|
||
| source $maindir/scripts/modules.quartz | ||
|
|
||
| srun -n $ncpus $exe -c $cfg_rom -i coords.in > PinnedH2O_rom_3DOF_${bondlength_num_increments}_${bondangle_num_increments}_${num_basis}.out | ||
|
|
||
| date |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| verbosity=1 | ||
| xcFunctional=PBE | ||
| FDtype=4th | ||
| [Mesh] | ||
| nx=64 | ||
| ny=64 | ||
| nz=64 | ||
| [Domain] | ||
| ox=-6. | ||
| oy=-6. | ||
| oz=-6. | ||
| lx=12. | ||
| ly=12. | ||
| lz=12. | ||
| [Potentials] | ||
| pseudopotential=pseudo.O_ONCV_PBE_SG15 | ||
| pseudopotential=pseudo.H_ONCV_PBE_SG15 | ||
| [Run] | ||
| type=MD | ||
| [MD] | ||
| num_steps=500 | ||
| dt=40. | ||
| thermostat=ON | ||
| [Thermostat] | ||
| type=Berendsen | ||
| temperature=1000. | ||
| relax_time=800. | ||
| [Quench] | ||
| max_steps=100 | ||
| atol=1.e-8 | ||
| [Orbitals] | ||
| initial_type=Random | ||
| initial_width=2. | ||
| nempty=68 | ||
| [Restart] | ||
| output_level=4 | ||
| [DensityMatrix] | ||
| solver=MVP | ||
| nb_inner_it=100 | ||
| [ROM] | ||
| stage=online_MVP | ||
| [ROM.offline] | ||
| basis_file=data/PinnedH2O_3DOF_orbitals_basis_2_2 | ||
| [ROM.basis] | ||
| compare_md=false | ||
| number_of_orbital_basis=34 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,6 +35,11 @@ | |
| #include "mgmol_Signal.h" | ||
| #include "tools.h" | ||
|
|
||
| #ifdef MGMOL_HAS_LIBROM | ||
| #include "rom_workflows.h" | ||
| #include "PinnedH2O.h" | ||
| #endif | ||
|
|
||
| #include <sstream> | ||
| #include <string> | ||
| #include <vector> | ||
|
|
@@ -400,7 +405,14 @@ void MGmol<OrbitalsType>::md(OrbitalsType** orbitals, Ions& ions) | |
| if (ct.restart_info < 3) | ||
| { | ||
| double eks = 0.; | ||
| quench(**orbitals, ions, ct.max_electronic_steps, 20, eks); | ||
| if (ct.getROMOptions().rom_stage == ROMStage::TEST_ORBITAL) | ||
| { | ||
| updateDMandEnergy(**orbitals, ions, eks); | ||
| } | ||
| else | ||
| { | ||
| quench(**orbitals, ions, ct.max_electronic_steps, 20, eks); | ||
| } | ||
| } | ||
|
|
||
| ct.max_changes_pot = 0; | ||
|
|
@@ -431,7 +443,14 @@ void MGmol<OrbitalsType>::md(OrbitalsType** orbitals, Ions& ions) | |
| bool last_move_is_small = true; | ||
| do | ||
| { | ||
| retval = quench(**orbitals, ions, ct.max_electronic_steps, 0, eks); | ||
| if (ct.getROMOptions().rom_stage == ROMStage::TEST_ORBITAL) | ||
| { | ||
| updateDMandEnergy(**orbitals, ions, eks); | ||
|
||
| } | ||
| else | ||
| { | ||
| retval = quench(**orbitals, ions, ct.max_electronic_steps, 0, eks); | ||
| } | ||
|
|
||
| // update localization regions | ||
| if (ct.adaptiveLRs()) | ||
|
|
@@ -495,7 +514,7 @@ void MGmol<OrbitalsType>::md(OrbitalsType** orbitals, Ions& ions) | |
| force(**orbitals, ions); | ||
|
|
||
| #ifdef MGMOL_HAS_LIBROM | ||
| if (ct.getROMOptions().num_orbbasis > 0) | ||
| if (ct.getROMOptions().rom_stage == ROMStage::TEST_ORBITAL) | ||
| { | ||
| if (onpe0) | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.