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/gromacs.sec
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ comprehensive suite for MD workflows. Its open-source nature and active communit
continuous development and support.

- examples/water-pulsed/water-pulsed
- examples/ml-mm/ml-mm
1 change: 1 addition & 0 deletions docs/src/topics/ml-models.sec
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ data.
- examples/flashmd/flashmd-demo
- examples/shiftml/shiftml-example
- examples/hamiltonian-qm7/hamiltonian-qm7
- examples/ml-mm/ml-mm
1 change: 1 addition & 0 deletions docs/src/topics/universal.sec
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ structural space.
- examples/pet-mad-uq/pet-mad-uq
- examples/flashmd/flashmd-demo
- examples/eon-pet-neb/eon-pet-neb
- examples/ml-mm/ml-mm
11 changes: 11 additions & 0 deletions examples/ml-mm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#*
*.cpt
*.edr
*.lock
*.log
*.npz
*.pt
*.trr
*.tpr
confout.gro
mdout.mdp
5 changes: 5 additions & 0 deletions examples/ml-mm/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ML-MM Simulations with GROMACS and Metatomic
============================================

Simulate alanine dipeptide in water using a machine learning potential for the
solute (ML-MM simulation) with GROMACS and the Metatomic interface.
6,790 changes: 6,790 additions & 0 deletions examples/ml-mm/data/conf.gro

Large diffs are not rendered by default.

219 changes: 219 additions & 0 deletions examples/ml-mm/data/topol.top
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
; Include forcefield parameters
#include "amber99sb.ff/forcefield.itp"

[ moleculetype ]
; Name nrexcl
Protein_chain_A 3

[ atoms ]
; nr type resnr residue atom cgnr charge mass typeB chargeB massB
; residue 1 ACE rtp ACE q 0.0
1 HC 1 ACE HH31 1 0.1123 1.008
2 CT 1 ACE CH3 2 -0.3662 12.01
3 HC 1 ACE HH32 3 0.1123 1.008
4 HC 1 ACE HH33 4 0.1123 1.008
5 C 1 ACE C 5 0.5972 12.01
6 O 1 ACE O 6 -0.5679 16 ; qtot 0
; residue 2 ALA rtp ALA q 0.0
7 N 2 ALA N 7 -0.4157 14.01
8 H 2 ALA H 8 0.2719 1.008
9 CT 2 ALA CA 9 0.0337 12.01
10 H1 2 ALA HA 10 0.0823 1.008
11 CT 2 ALA CB 11 -0.1825 12.01
12 HC 2 ALA HB1 12 0.0603 1.008
13 HC 2 ALA HB2 13 0.0603 1.008
14 HC 2 ALA HB3 14 0.0603 1.008
15 C 2 ALA C 15 0.5973 12.01
16 O 2 ALA O 16 -0.5679 16 ; qtot 0
; residue 3 NME rtp NME q 0.0
17 N 3 NME N 17 -0.4157 14.01
18 H 3 NME H 18 0.2719 1.008
19 CT 3 NME CH3 19 -0.149 12.01
20 H1 3 NME HH31 20 0.0976 1.008
21 H1 3 NME HH32 21 0.0976 1.008
22 H1 3 NME HH33 22 0.0976 1.008 ; qtot 0

[ bonds ]
; ai aj funct c0 c1 c2 c3
1 2 1
2 3 1
2 4 1
2 5 1
5 6 1
5 7 1
7 8 1
7 9 1
9 10 1
9 11 1
9 15 1
11 12 1
11 13 1
11 14 1
15 16 1
15 17 1
17 18 1
17 19 1
19 20 1
19 21 1
19 22 1

[ pairs ]
; ai aj funct c0 c1 c2 c3
1 6 1
1 7 1
2 8 1
2 9 1
3 6 1
3 7 1
4 6 1
4 7 1
5 10 1
5 11 1
5 15 1
6 8 1
6 9 1
7 12 1
7 13 1
7 14 1
7 16 1
7 17 1
8 10 1
8 11 1
8 15 1
9 18 1
9 19 1
10 12 1
10 13 1
10 14 1
10 16 1
10 17 1
11 16 1
11 17 1
12 15 1
13 15 1
14 15 1
15 20 1
15 21 1
15 22 1
16 18 1
16 19 1
18 20 1
18 21 1
18 22 1

[ angles ]
; ai aj ak funct c0 c1 c2 c3
1 2 3 1
1 2 4 1
1 2 5 1
3 2 4 1
3 2 5 1
4 2 5 1
2 5 6 1
2 5 7 1
6 5 7 1
5 7 8 1
5 7 9 1
8 7 9 1
7 9 10 1
7 9 11 1
7 9 15 1
10 9 11 1
10 9 15 1
11 9 15 1
9 11 12 1
9 11 13 1
9 11 14 1
12 11 13 1
12 11 14 1
13 11 14 1
9 15 16 1
9 15 17 1
16 15 17 1
15 17 18 1
15 17 19 1
18 17 19 1
17 19 20 1
17 19 21 1
17 19 22 1
20 19 21 1
20 19 22 1
21 19 22 1

[ dihedrals ]
; ai aj ak al funct c0 c1 c2 c3 c4 c5
1 2 5 6 9
1 2 5 7 9
3 2 5 6 9
3 2 5 7 9
4 2 5 6 9
4 2 5 7 9
2 5 7 8 9
2 5 7 9 9
6 5 7 8 9
6 5 7 9 9
5 7 9 10 9
5 7 9 11 9
5 7 9 15 9
8 7 9 10 9
8 7 9 11 9
8 7 9 15 9
7 9 11 12 9
7 9 11 13 9
7 9 11 14 9
10 9 11 12 9
10 9 11 13 9
10 9 11 14 9
15 9 11 12 9
15 9 11 13 9
15 9 11 14 9
7 9 15 16 9
7 9 15 17 9
10 9 15 16 9
10 9 15 17 9
11 9 15 16 9
11 9 15 17 9
9 15 17 18 9
9 15 17 19 9
16 15 17 18 9
16 15 17 19 9
15 17 19 20 9
15 17 19 21 9
15 17 19 22 9
18 17 19 20 9
18 17 19 21 9
18 17 19 22 9

[ dihedrals ]
; ai aj ak al funct c0 c1 c2 c3
2 7 5 6 4
5 9 7 8 4
9 17 15 16 4
15 19 17 18 4

; Include Position restraint file
#ifdef POSRES
#include "posre.itp"
#endif

; Include water topology
#include "amber99sb.ff/tip3p.itp"

#ifdef POSRES_WATER
; Position restraint for each water oxygen
[ position_restraints ]
; i funct fcx fcy fcz
1 1 1000 1000 1000
#endif

; Include topology for ions
#include "amber99sb.ff/ions.itp"

[ system ]
; Name
Alanine dipeptide in water

[ molecules ]
; Compound #mols
Protein_chain_A 1
SOL 2255
8 changes: 8 additions & 0 deletions examples/ml-mm/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
channels:
- conda-forge
dependencies:
- chemiscope
- gromacs
- mdanalysis
- metatrain
- python=3.12
30 changes: 30 additions & 0 deletions examples/ml-mm/grompp.mdp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
; Run control
integrator = md
dt = 0.0005
nsteps = 500

; Output control
nstxout = 10
nstvout = 10
nstenergy = 10
nstcalcenergy = 10
nstlog = 10

; Neighborsearching
cutoff-scheme = Verlet
pbc = xyz

; Electrostatics
coulombtype = PME

; Temperature coupling
tcoupl = v-rescale
tc-grps = water protein ; two coupling groups - more accurate
tau-t = 2.0 2.0 ; time constant, in ps
ref-t = 300 300

; Metatomic interface
; metatomic-active = yes
; metatomic-input-group = protein ; the group on which ML forces are applied
; metatomic-modelfile = pet-mad-v1.0.2.pt ; path to the ML model file
; metatomic-device = cpu ; device to run the ML model on (cpu or cuda)
Loading