Skip to content

Commit

Permalink
adds MD example
Browse files Browse the repository at this point in the history
  • Loading branch information
bananenpampe committed Mar 4, 2024
1 parent f831510 commit 37313c1
Show file tree
Hide file tree
Showing 4 changed files with 282 additions and 4 deletions.
31 changes: 27 additions & 4 deletions Atomistic_experiments/BPNN_model/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,33 @@ pip install $PIP_FLAGS "rascaline-torch @ git+https://github.com/luthaf/rascalin

pip install -r requirements.txt

echo "All dependencies have been installed. - running a minimal test of the install"
#echo "All dependencies have been installed. - running a minimal test of the install"

cd ./test_install
#cd ./test_install

python training.py
#python training.py
#no ensure that this does not exit with fail
python -u compare.py
#python -u compare.py

# clones the my ipi
git clone [email protected]:bananenpampe/i-pi.git

# change into the directory change the absolute path LIGHNING_CALCULATOR_PATH
# in ./i-pi/drivers/py/pes/lightning.py to the absolute location of '/H2O/driver/'

cd ./H2O/driver/

LIGHNING_CALCULATOR_PATH=$(pwd)

cd ../../

cd ./i-pi/drivers/py/pes

# change the absolute path in the lightning.py file
sed -i '' "s|/Users/matthiaskellner/Documents/PhD/H2O/driver/|${LIGHNING_CALCULATOR_PATH}|g" lightning.py

cd ../../../

pip install -e .

cd ..
14 changes: 14 additions & 0 deletions Atomistic_experiments/MD/H2O/300K_64/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

which python
rm -f /tmp/ipi_alchem_H2O_5

i-pi simulation.xml &

sleep 10s

echo "Current time: $(date +"%H:%M:%S")"

i-pi-py_driver -m lightning -a alchem_H2O_5 -u -o ../../../eval/H2O/shallow_ens/example.ckpt,start_64.xyz


47 changes: 47 additions & 0 deletions Atomistic_experiments/MD/H2O/300K_64/simulation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<simulation verbosity= "low">
<output prefix="BPNN-H2O-md">
<properties stride="100" filename="out"> [ step, time{picosecond}, conserved{electronvolt},
temperature{kelvin}, kinetic_md{electronvolt}, potential{electronvolt}, pressure_md{bar}, volume{angstrom3},
ensemble_temperature{kelvin}, cell_abcABC] </properties>
<trajectory filename="xc" stride="100" cell_units="angstrom"> x_centroid{angstrom} </trajectory>
<trajectory filename='committee_pot' stride='100' extra_type='committee_pot'> extras </trajectory>
<checkpoint stride="1000"/>
</output>
<total_steps> 2000000 </total_steps>
<prng><seed>64</seed></prng>
<ffsocket mode='unix' name='driver' matching='any'>
<latency> 1.00000000e-02</latency>
<slots>4</slots>
<port>12345</port>
<timeout>60.000000e+00</timeout>
<address>alchem_H2O_5</address>
</ffsocket>
<system>
<initialize nbeads="1">
<file mode="ase" units="angstrom" cell_units="angstrom"> start_64.xyz </file>
<velocities mode="thermal" units="kelvin">300 </velocities>
</initialize>
<forces>
<force forcefield='driver'/>
</forces>
<motion mode="dynamics">
<dynamics mode="nvt">
<timestep units="femtosecond"> 0.5 </timestep>
<thermostat mode='gle'>
<A shape='(5,5)'>
[
4.498098855452e-3, 6.594810718477e-6, 2.788030342989e-4, -8.808265165053e-4, 5.605371493938e-3,
-6.726802271646e-6, 2.079069559861e-9, 1.746169548818e-5, -4.800164465960e-6, 1.025830873432e-5,
-3.586191452340e-4, -1.746169548818e-5, 3.287481976399e-5, 1.245698716799e-4, -2.417657162526e-4,
-2.508912543565e-4, 4.800164465960e-6, -1.245698716799e-4, 6.449207766266e-4, 2.783583234046e-4,
5.273493443008e-3, -1.025830873432e-5, 2.417657162526e-4, -2.783583234046e-4, 7.488477456790e-3
]
</A>
</thermostat>
</dynamics>
</motion>
<ensemble>
<temperature units="kelvin"> 300 </temperature>
</ensemble>
</system>
</simulation>
Loading

0 comments on commit 37313c1

Please sign in to comment.