Skip to content
Draft
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
1 change: 1 addition & 0 deletions docs/src/software/chemiscope.sec
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ repository <https://github.com/lab-cosmo/chemiscope>`_.
- examples/pi-metad/pi-metad
- examples/path-integrals/path-integrals
- examples/thermostats/thermostats
- examples/o3-averaging/o3-averaging
1 change: 1 addition & 0 deletions docs/src/software/i-pi.sec
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ it on the `ipi-code website <http://ipi-code.org>`_, the `documentation pages
- examples/path-integrals/path-integrals
- examples/pi-metad/pi-metad
- examples/heat-capacity/heat-capacity
- examples/o3-averaging/o3-averaging
1 change: 1 addition & 0 deletions docs/src/software/lammps.sec
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ efficient domain decomposition scheme. Learn more about LAMMPS on its `homepage
- examples/thermostats/thermostats
- examples/path-integrals/path-integrals
- examples/heat-capacity/heat-capacity
- examples/o3-averaging/o3-averaging
1 change: 1 addition & 0 deletions docs/src/topics/ml-models.sec
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ data.
- examples/lode-linear/lode-linear
- examples/sample-selection/sample-selection
- examples/periodic-hamiltonian/periodic-hamiltonian
- examples/o3-averaging/o3-averaging
1 change: 1 addition & 0 deletions docs/src/topics/sampling.sec
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ set of configurations of an atomistic system.
- examples/pi-metad/pi-metad
- examples/batch-cp2k/reference-trajectory
- examples/heat-capacity/heat-capacity
- examples/o3-averaging/o3-averaging
6 changes: 6 additions & 0 deletions examples/o3-averaging/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Rotational averaging of non-equivariant models
==============================================

This example shows how to assess (and to an extent correct) the
influence of non-equivariant terms in the potential energy computed
by an unconstrained machine-learning model.
35 changes: 35 additions & 0 deletions examples/o3-averaging/data/in-mol.lmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
units electron
atom_style full

pair_style lj/cut/tip4p/cut 1 2 1 1 0.278072379 17.001
# high-pppm precision and shift to get meaningful fd estimates
# kspace_style none
# kspace_style pppm/tip4p 1e-5
pair_modify shift yes
bond_style class2
angle_style harmonic


read_data water_1_data.lmp
pair_coeff * * 0 0
pair_coeff 1 1 0.000295147 5.96946

neighbor 2.0 bin


timestep 0.00025

#velocity all create 298.0 2345187

#thermo_style multi
#thermo 1

#fix 1 all nvt temp 298.0 298.0 30.0 tchain 1
#fix 1 all nve
fix 1 all ipi h2o-lammps 32342 unix


#dump 1 all xyz 25 dump.xyz

run 100000000

34 changes: 34 additions & 0 deletions examples/o3-averaging/data/in.lmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
units electron
atom_style full

pair_style lj/cut/tip4p/long 1 2 1 1 0.278072379 17.001
# high-pppm precision and shift to get meaningful fd estimates
kspace_style pppm/tip4p 1e-5
pair_modify shift yes
bond_style class2
angle_style harmonic


read_data data/water_32_data.lmp
pair_coeff * * 0 0
pair_coeff 1 1 0.000295147 5.96946

neighbor 2.0 bin


timestep 0.00025

#velocity all create 298.0 2345187

#thermo_style multi
#thermo 1

#fix 1 all nvt temp 298.0 298.0 30.0 tchain 1
#fix 1 all nve
fix 1 all ipi h2o-lammps 32342 unix


#dump 1 all xyz 25 dump.xyz

run 100000000

5 changes: 5 additions & 0 deletions examples/o3-averaging/data/init-mol.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
3
Lattice="100.0 0.0 0.0 0.0 100.0 0.0 0.0 0.0 100.0" Properties=species:S:1:pos:R:3:momenta:R:3 ipi_comment="Step: 200000 Bead: 0 positions{angstrom} cell{angstrom}" pbc="T T T"
O -2.89770838 6.76492149 25.78733892 0.41094839 -0.09429088 0.29861888
H -3.22693259 6.92327461 24.89600383 -0.31547195 0.04597911 -0.02131858
H -3.73951469 6.82619967 26.21403556 -0.09547645 0.04831177 -0.27730030
38 changes: 38 additions & 0 deletions examples/o3-averaging/data/input-mol-grid.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!-- safe_stride is the frequency at which i-PI makes internal snapshots for restarting -->
<simulation verbosity='medium' threading='false' safe_stride='10'>
<ffsocket name='lmpserial' mode='unix' pbc='false'>
<address>h2o-lammps</address> <latency> 1e-4 </latency>
</ffsocket>
<ffrotations name='driver-noo3' mode='unix' pbc='false'>
<address>h2o-noo3</address>
<grid_order> 3 </grid_order>
<grid_mode> legendre </grid_mode>
<inversion> True </inversion>
</ffrotations>
<total_steps>10000</total_steps>
<output prefix='nve-mol'>
<trajectory stride='20' filename='pos' format='xyz'> positions </trajectory>
<properties stride='20'> [ step, time, conserved, temperature{kelvin}, kinetic_md, potential, pressure_md ] </properties>
</output>
<prng>
<seed>32123</seed>
</prng>
<system>
<forces>
<force forcefield='lmpserial'></force>
<force forcefield='driver-noo3' weight="1.0"/>
</forces>
<initialize nbeads='1'>
<file mode='ase'> init-mol.xyz </file>
</initialize>
<ensemble>
<temperature units='kelvin'> 300 </temperature>
</ensemble>
<motion mode='dynamics'>
<fixcom> True </fixcom>
<dynamics mode='nve'>
<timestep units='femtosecond'> 0.5 </timestep>
</dynamics>
</motion>
</system>
</simulation>
35 changes: 35 additions & 0 deletions examples/o3-averaging/data/input-mol-noo3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!-- safe_stride is the frequency at which i-PI makes internal snapshots for restarting -->
<simulation verbosity='medium' threading='false' safe_stride='10'>
<ffsocket name='lmpserial' mode='unix' pbc='false'>
<address>h2o-lammps</address> <latency> 1e-4 </latency>
</ffsocket>
<ffsocket name='driver-noo3' mode='unix' pbc='false'>
<address>h2o-noo3</address>
</ffsocket>
<total_steps>10000</total_steps>
<output prefix='nve-mol'>
<trajectory stride='20' filename='pos' format='xyz'> positions </trajectory>
<properties stride='20'> [ step, time, conserved, temperature{kelvin}, kinetic_md, potential, pressure_md ] </properties>
</output>
<prng>
<seed>32123</seed>
</prng>
<system>
<forces>
<force forcefield='lmpserial'></force>
<force forcefield='driver-noo3' weight="1.0"/>
</forces>
<initialize nbeads='1'>
<file mode='ase'> init-mol.xyz </file>
</initialize>
<ensemble>
<temperature units='kelvin'> 300 </temperature>
</ensemble>
<motion mode='dynamics'>
<fixcom> True </fixcom>
<dynamics mode='nve'>
<timestep units='femtosecond'> 0.5 </timestep>
</dynamics>
</motion>
</system>
</simulation>
41 changes: 41 additions & 0 deletions examples/o3-averaging/data/input-noo3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<simulation verbosity='medium' safe_stride='100'>
<output prefix='water-noo3'>
<properties filename='out' stride='4'>
[ step, time{picosecond}, conserved, potential, kinetic_cv,
scaledcoords(fd_delta=5e-3) ]
</properties>
<trajectory filename='noo3_pots' stride='2' extra_type="o3grid_pots"> extras_component_raw(1) </trajectory>
<trajectory filename='pos' stride='20' format='ase'> positions </trajectory>
</output>
<total_steps> 2000 </total_steps>
<prng>
<seed> 32342 </seed>
</prng>
<ffsocket name='lmpserial' mode='unix' pbc='false'>
<address>h2o-lammps</address> <latency> 1e-4 </latency>
</ffsocket>
<ffrotations name='noo3' mode='unix' pbc='false'>
<address>h2o-noo3</address> <latency> 1e-4 </latency>
</ffrotations>
<system>
<initialize nbeads='1'>
<file mode='pdb' units='angstrom'> data/water_32.pdb </file>
<velocities mode='thermal' units='kelvin'> 300 </velocities>
</initialize>
<forces>
<force forcefield='lmpserial'/>
<force forcefield='noo3'/>
</forces>
<ensemble>
<temperature units='kelvin'>300</temperature>
</ensemble>
<motion mode='dynamics'>
<dynamics mode='nvt'>
<thermostat mode='langevin'>
<tau units="femtosecond"> 100.0 </tau>
</thermostat>
<timestep units='femtosecond'> 0.5 </timestep>
</dynamics>
</motion>
</system>
</simulation>
26 changes: 26 additions & 0 deletions examples/o3-averaging/data/replay-noo3.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<simulation verbosity='medium' safe_stride='100'>
<output prefix='water-noo3'>
<properties filename='out' stride='1'>
[ step, time{picosecond}, conserved, potential, kinetic_cv,
scaledcoords(fd_delta=5e-3) ]
</properties>
</output>
<ffsocket name='lmpserial' mode='unix' pbc='false'>
<address>h2o-lammps</address> <latency> 1e-4 </latency>
</ffsocket>
<ffrotations name='noo3' mode='unix' pbc='false'>
<address>h2o-noo3</address> <latency> 1e-4 </latency>
</ffrotations>
<system>
<initialize nbeads='1'>
<file mode='ase' units='angstrom'> init-mol.xyz </file>
</initialize>
<forces>
<force forcefield='lmpserial'/>
<force forcefield='noo3'/>
</forces>
<motion mode='replay'>
<file mode='ase'> replay.xyz </file>
</motion>
</system>
</simulation>
41 changes: 41 additions & 0 deletions examples/o3-averaging/data/water_1_data.lmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
LAMMPS Description

3 atoms
2 bonds
1 angles

2 atom types
1 bond types
1 angle types

-19 19.38859 xlo xhi
-10 19.38859 ylo yhi
-19 19.38859 zlo zhi

Masses

1 15.9994
2 1.0080

Bond Coeffs

1 1.78 0.2708585 -0.327738785 0.231328959

Angle Coeffs

1 0.0700 107.400000

Atoms

1 1 1 -1.1128 7.098 8.901 17.941
2 1 2 0.5564 8.700 8.073 18.276
3 1 2 0.5564 7.555 10.053 16.607

Bonds

1 1 1 2
2 1 1 3

Angles

1 1 2 1 3
98 changes: 98 additions & 0 deletions examples/o3-averaging/data/water_32.pdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
CRYST1 10.260 10.260 10.260 90.00 90.00 90.00 P 1
ATOM 1 O 1 1 3.756 4.710 9.494 0.00 0.00 O
ATOM 2 H 1 1 4.604 4.272 9.671 0.00 0.00 H
ATOM 3 H 1 1 3.998 5.320 8.788 0.00 0.00 H
ATOM 4 O 1 1 9.933 8.841 0.366 0.00 0.00 O
ATOM 5 H 1 1 10.132 8.196 1.120 0.00 0.00 H
ATOM 6 H 1 1 9.368 8.449 -0.316 0.00 0.00 H
ATOM 7 O 1 1 0.321 1.492 5.796 0.00 0.00 O
ATOM 8 H 1 1 -0.287 1.993 5.241 0.00 0.00 H
ATOM 9 H 1 1 0.791 2.061 6.364 0.00 0.00 H
ATOM 10 O 1 1 8.035 9.735 4.307 0.00 0.00 O
ATOM 11 H 1 1 7.203 9.789 4.847 0.00 0.00 H
ATOM 12 H 1 1 8.636 9.307 4.920 0.00 0.00 H
ATOM 13 O 1 1 5.663 9.082 0.660 0.00 0.00 O
ATOM 14 H 1 1 6.378 9.721 0.814 0.00 0.00 H
ATOM 15 H 1 1 5.213 8.991 1.552 0.00 0.00 H
ATOM 16 O 1 1 8.130 0.215 1.201 0.00 0.00 O
ATOM 17 H 1 1 8.196 -0.065 2.118 0.00 0.00 H
ATOM 18 H 1 1 8.938 -0.161 0.818 0.00 0.00 H
ATOM 19 O 1 1 8.177 4.165 0.716 0.00 0.00 O
ATOM 20 H 1 1 7.895 5.066 0.840 0.00 0.00 H
ATOM 21 H 1 1 7.722 3.562 1.341 0.00 0.00 H
ATOM 22 O 1 1 6.341 3.256 9.678 0.00 0.00 O
ATOM 23 H 1 1 7.133 3.423 10.189 0.00 0.00 H
ATOM 24 H 1 1 6.507 2.398 9.350 0.00 0.00 H
ATOM 25 O 1 1 0.136 7.798 2.738 0.00 0.00 O
ATOM 26 H 1 1 -0.006 8.300 3.584 0.00 0.00 H
ATOM 27 H 1 1 0.314 6.905 2.966 0.00 0.00 H
ATOM 28 O 1 1 5.027 2.563 6.169 0.00 0.00 O
ATOM 29 H 1 1 5.538 3.336 6.262 0.00 0.00 H
ATOM 30 H 1 1 5.313 2.031 6.922 0.00 0.00 H
ATOM 31 O 1 1 7.164 2.542 2.418 0.00 0.00 O
ATOM 32 H 1 1 6.248 2.467 2.667 0.00 0.00 H
ATOM 33 H 1 1 7.384 1.681 2.057 0.00 0.00 H
ATOM 34 O 1 1 3.336 9.051 3.265 0.00 0.00 O
ATOM 35 H 1 1 2.818 8.341 2.787 0.00 0.00 H
ATOM 36 H 1 1 2.733 9.794 3.398 0.00 0.00 H
ATOM 37 O 1 1 1.476 1.420 0.819 0.00 0.00 O
ATOM 38 H 1 1 1.060 0.568 0.631 0.00 0.00 H
ATOM 39 H 1 1 1.582 1.509 1.770 0.00 0.00 H
ATOM 40 O 1 1 1.222 4.946 3.218 0.00 0.00 O
ATOM 41 H 1 1 2.111 4.703 3.522 0.00 0.00 H
ATOM 42 H 1 1 1.342 4.956 2.245 0.00 0.00 H
ATOM 43 O 1 1 6.790 6.491 4.488 0.00 0.00 O
ATOM 44 H 1 1 7.083 5.755 5.074 0.00 0.00 H
ATOM 45 H 1 1 6.747 7.293 4.975 0.00 0.00 H
ATOM 46 O 1 1 9.330 3.465 4.430 0.00 0.00 O
ATOM 47 H 1 1 9.974 3.956 3.918 0.00 0.00 H
ATOM 48 H 1 1 8.583 3.143 3.966 0.00 0.00 H
ATOM 49 O 1 1 7.484 4.543 6.379 0.00 0.00 O
ATOM 50 H 1 1 7.604 4.450 7.328 0.00 0.00 H
ATOM 51 H 1 1 8.241 4.098 5.987 0.00 0.00 H
ATOM 52 O 1 1 0.448 5.701 8.219 0.00 0.00 O
ATOM 53 H 1 1 0.573 4.840 7.871 0.00 0.00 H
ATOM 54 H 1 1 0.720 5.651 9.123 0.00 0.00 H
ATOM 55 O 1 1 0.736 4.082 0.545 0.00 0.00 O
ATOM 56 H 1 1 1.032 3.147 0.501 0.00 0.00 H
ATOM 57 H 1 1 -0.250 3.978 0.476 0.00 0.00 H
ATOM 58 O 1 1 4.229 2.582 3.562 0.00 0.00 O
ATOM 59 H 1 1 4.650 2.364 4.424 0.00 0.00 H
ATOM 60 H 1 1 4.306 3.526 3.496 0.00 0.00 H
ATOM 61 O 1 1 3.749 5.318 3.591 0.00 0.00 O
ATOM 62 H 1 1 3.577 5.600 2.690 0.00 0.00 H
ATOM 63 H 1 1 4.519 5.812 3.831 0.00 0.00 H
ATOM 64 O 1 1 0.242 8.540 5.195 0.00 0.00 O
ATOM 65 H 1 1 0.243 9.452 5.454 0.00 0.00 H
ATOM 66 H 1 1 0.725 8.102 5.864 0.00 0.00 H
ATOM 67 O 1 1 6.065 0.243 8.171 0.00 0.00 O
ATOM 68 H 1 1 6.685 -0.360 8.559 0.00 0.00 H
ATOM 69 H 1 1 5.235 -0.020 8.586 0.00 0.00 H
ATOM 70 O 1 1 7.362 8.029 9.049 0.00 0.00 O
ATOM 71 H 1 1 6.719 7.831 8.312 0.00 0.00 H
ATOM 72 H 1 1 6.813 7.839 9.757 0.00 0.00 H
ATOM 73 O 1 1 1.971 1.171 3.631 0.00 0.00 O
ATOM 74 H 1 1 1.520 1.399 4.474 0.00 0.00 H
ATOM 75 H 1 1 2.821 1.577 3.533 0.00 0.00 H
ATOM 76 O 1 1 7.674 6.605 2.134 0.00 0.00 O
ATOM 77 H 1 1 7.143 6.490 2.918 0.00 0.00 H
ATOM 78 H 1 1 8.563 6.681 2.409 0.00 0.00 H
ATOM 79 O 1 1 2.769 7.384 7.275 0.00 0.00 O
ATOM 80 H 1 1 2.353 8.088 7.748 0.00 0.00 H
ATOM 81 H 1 1 2.249 6.554 7.408 0.00 0.00 H
ATOM 82 O 1 1 2.253 2.791 7.349 0.00 0.00 O
ATOM 83 H 1 1 2.718 3.230 8.076 0.00 0.00 H
ATOM 84 H 1 1 2.955 2.671 6.707 0.00 0.00 H
ATOM 85 O 1 1 3.652 9.953 9.290 0.00 0.00 O
ATOM 86 H 1 1 4.114 9.509 9.983 0.00 0.00 H
ATOM 87 H 1 1 3.199 10.639 9.784 0.00 0.00 H
ATOM 88 O 1 1 5.263 6.708 7.589 0.00 0.00 O
ATOM 89 H 1 1 4.318 7.082 7.707 0.00 0.00 H
ATOM 90 H 1 1 5.455 7.057 6.733 0.00 0.00 H
ATOM 91 O 1 1 3.507 6.721 1.020 0.00 0.00 O
ATOM 92 H 1 1 4.097 7.303 0.607 0.00 0.00 H
ATOM 93 H 1 1 3.586 5.984 0.419 0.00 0.00 H
ATOM 94 O 1 1 5.455 9.196 5.888 0.00 0.00 O
ATOM 95 H 1 1 5.473 9.602 6.758 0.00 0.00 H
ATOM 96 H 1 1 4.549 9.238 5.484 0.00 0.00 H
END
Loading
Loading