Skip to content

Commit

Permalink
Added a stub of an example, and have something that "just runs"
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Sep 25, 2024
1 parent 488239d commit 6ec6983
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 239 deletions.
35 changes: 35 additions & 0 deletions examples/features/o3_averaging/random_liquid_water/input.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<simulation verbosity='high'>
<output prefix='simulation'>
<properties stride='1' filename='out'> [ step, time{picosecond}, conserved{electronvolt}, temperature{kelvin}, kinetic_cv{electronvolt}, potential{electronvolt}, pressure_cv{megapascal} ] </properties>
<trajectory filename='pos' stride='20' cell_units='angstrom'> positions{angstrom} </trajectory>
<checkpoint stride='200'/>
</output>
<total_steps>100</total_steps>
<prng>
<seed>31415</seed>
</prng>
<ffrotations name='driver-qtip4pf' mode='unix' pbc='false'>
<address>h2o-md.1</address>
<grid> 2 </grid>
</ffrotations>
<system>
<initialize nbeads='1'>
<file mode='xyz'> water_216.xyz </file>
<velocities mode='thermal' units='kelvin'> 300 </velocities>
</initialize>
<forces>
<force forcefield='driver-qtip4pf'> </force>
</forces>
<motion mode='dynamics'>
<dynamics mode='nvt'>
<timestep units='femtosecond'> 0.5 </timestep>
<thermostat mode='svr'>
<tau units='femtosecond'> 100 </tau>
</thermostat>
</dynamics>
</motion>
<ensemble>
<temperature units='kelvin'> 300 </temperature>
</ensemble>
</system>
</simulation>
16 changes: 16 additions & 0 deletions examples/features/o3_averaging/random_liquid_water/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ipi=i-pi
driver="i-pi-driver -m qtip4pf -u -a h2o-md.1"
sleep_time=4

${ipi} input.xml > log.i-pi &
echo "# i-PI is running"

echo "# Waiting for ${sleep_time} (s) before executing driver"
sleep ${sleep_time}

${driver} > /dev/null &
echo "# Driver is running"

wait

echo "# Simulation complete"
6 changes: 3 additions & 3 deletions ipi/engine/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ def copy(self):
"""

newat = Atoms(self.natoms)
newat.q[:] = self.q
newat.p[:] = self.p
newat.m[:] = self.m
newat.q[:] = dstrip(self.q)
newat.p[:] = dstrip(self.p)
newat.m[:] = dstrip(self.m)
newat.names[:] = self.names
return newat

Expand Down
Loading

0 comments on commit 6ec6983

Please sign in to comment.