Hi
I am trying To calculate the Mean Squared Displacement (MSD) of the Center of Mass (COM) of a LI ions molecule in PEO-LiTFSI system (15 peo chains, 15 TFSI molecules and 15 LI ions total 1-9720 atoms) over all points in the trajectory separated by the corresponding time in Gromacs. Here are the steps which i followed:
-
Generate a trajectory: Run a molecular dynamics simulation of your system and generate a trajectory file (.xtc or .trr) and a topology file (.tpr).
-
Select the TFSI: Create an index file (.ndx) which contains the index of the all atoms of 15 LI (index starting from 9706-9720) that you I want to analyze using the following command
gmx make_ndx -f system.gro -o LI_index.ndx
- Calculate COM: Use “gmx traj” command to calculate the center of mass (COM) coordinate of the lithium ion and save it in a .xtc file using command
gmx traj -s system.tpr -f system.xtc -n li_index.ndx -com -nojump -o LI_com_output.xtc
Now this Li_com_ouput.xtc contains only 15 atoms.
But after this when i tried to calculate Calculate MSD: Use “gmx msd” command to calculate MSD of the lithium ion COM coordinate by using this command
gmx msd -f LI_com_output.xtc -s system.tpr -n LI_index.ndx -mol -trestart 10000
The following errors appears:
gmx msd -f LI-com-output.xtc -s md.tpr -n li-index.ndx -mol -trestart 10000
:-) GROMACS - gmx msd, 2022.3 (-:
Executable: /home/user/gromacs/bin/gmx
Data prefix: /home/user/gromacs
Working dir: /media/user/My Book/GROMACS/PEO90-LI-V2/PEOLI-15
Command line:
gmx msd -f LI-com-output.xtc -s md.tpr -n li-index.ndx -mol -trestart 10000
Available static index groups:
Group 0 “LI” (15 atoms)
Specify any number of selections for option ‘sel’
(Selections to compute MSDs for from the reference):
(one per line, for status/groups, ‘help’ for help, Ctrl-D to end)
0
Selection ‘0’ parsed
Reading file md.tpr, VERSION 2022.3 (single precision)
Reading file md.tpr, VERSION 2022.3 (single precision)
Reading frame 0 time 0.000
Program: gmx msd, version 2022.3
Source file: src/gromacs/pbcutil/mshift.cpp (line 117)
Fatal error:
Molecule in topology has atom numbers below and above natoms (1).
You are probably trying to use a trajectory which does not match the first 1
atoms of the run input file.
You can make a matching run input file with gmx convert-tpr.
#################
then i used gmx convert-tpr -s md.tpr -n li-index.ndx -o li.tpr
to modify topology containing only lithium. and got this result
Command line:
gmx convert-tpr -s md.tpr -n li-index.ndx -o li.tpr
Reading file md.tpr, VERSION 2022.3 (single precision)
Group 0 ( LI) has 15 elements
There is one group in the index
Will write subset LI of original tpx containing 15 atoms
Reduced ilist BONDS from 4245 to 0 entries
Reduced ilist ANGLES from 17925 to 0 entries
Reduced ilist RBDIHS from 20475 to 0 entries
Reduced ilist LJ14 from 20475 to 0 entries
Reduced ilist CONSTR from 5430 to 0 entries
Reduced block excls from 9720 to 15 index-, 105870 to 15 a-entries
#######################
after using the modified topology for MSD calculation i got this error.
Inconsistency in user input:
Invalid index group references encountered
Group ‘LI’ cannot be used in selections, because it contains negative atom
indices and/or references atoms not present (largest allowed atom index is
15).
Now should i modify my LI-index.ndx now? starting randomly 1-15? my original LI-Index.ndx contains lithium index starting from 9706-9720.???