# Back-mapping Martini 3 coarse-grain to all-atom representations

I have a $$10\mu s$$ trajectory with 10,000 frames that I would like to backmap to atomistic representations so that I can compare my ensemble to experimental measurements.

I am using MartiniTools for this, specifically the scripts initram.sh and backward.py to one-by-one generate atomic coordinate files from CG frames. I made a shell script to back-map:

#!/bin/bash

for i in {0..10000}
do
../../martini3/MartiniTools/initram.sh -f "trjg/_state$$i.gro" -o "atomistic/charmm_state$$i.gro" -to charmm27 -p atomistic_topology2.top
done


This works fine until the script reaches frame 55, at which point the shell stops, no PDB file is output, and I get the following warnings in console:

Step 0, time 0 (ps)  LINCS WARNING
relative constraint deviation after LINCS:
rms 0.285972, max 5.254007 (between atoms 341 and 343)
bonds that rotated more than 90 degrees:
atom 1 atom 2  angle  previous, current, constraint length
263    265   93.2    0.1580   0.2883      0.1538
285    287   98.4    0.1638   0.2961      0.1538
302    304  101.1    0.1703   0.4000      0.1538


If I press CTRL+C, that iteration of the script is killed and it moves onto the next one but no output .gro file is written. I am hoping desperately someone can help me modify the md parameters so that the energy minimization warnings/constraint warnings are ignored and I can obtain my ensemble!

I tried modifying the MD parameters within initram.sh to the following to see if it would flow:

integrator=steep
nsteps=\$EMSTEPS (changed to 2500 instead of default 500)
emtol=9999999999 (from default 10)
emstep=0.05 (from default 0.1)
pbc=xyz
lincs-warnangle=90 (from default 30)


Any help is greatly appreciated!

Description of initram.sh:

1. Projection
2. Energy minimization ( steps), excluding non-bonded interactions
between atoms in selected groups, e.g. membrane and protein.
3. Energy minimization (500 steps)
4. Position restrained NVT simulation (300K), with time step 0.2 fs
5. Position restrained NVT simulation (300K), with time step 0.5 fs
6. Position restrained NVT simulation (300K), with time step 1.0 fs
7. Position restrained NVT simulation (300K), with time step 2.0 fs

• The script seems to work just fine on a previous trajectory I made that only had secondary structure constraints. I think it may be the elastic network I introduced that is causing problems :/ Jul 28 at 0:52
• I gave my +1 a long time back but I'm just commenting now to say that I opened up an issue at GitHub to try to help get this question answered: github.com/Tsjerk/MartiniTools/issues/4. Hopefully it helps! Aug 24 at 0:31
• Thank you sir! I reran my sim without an elastic network and encountered fewer of these errors. Are you encountering something similar or just being an awesome person trying to get me help? Aug 24 at 0:32
• I had no idea what MartiniTools or Martini 3 were before I saw this question, so I'm quite certain that I'm not encountering a similar error, hahaha Aug 24 at 0:33