Just copy and paste the lines that belong to the molecule of interest. You may use the fields with the residue name or the chain name for orientation.
After pasting, the atoms might not be numbered from 1. Use pdb_atom_renumber.py to renumber your atoms. (Hack the source to renumber residues.)mdrun -deffnm PREFIX -cpi PREFIX.cpt
If trajectories contain data that was written after the creation of the last check-point, these data will be overwritten.
gmxcheck -f TRAJECTORY
To save these coordinates
trjconv -fit rot+trans -s SYSTEM.tpr -f TRAJECTORY.xtc -o OUTPUT.xtc
editconf -ndef -f ORIGINAL.gro -o SELECTED_STRUCTURE.gro
In the interactive selection dialog, select the stucture of interest.
When a tpr (binary topology) is created with grompp, you supply initial conditions in a .gro file. Only if the .gro contains velocity data and you specify the option gen_vel=no, velocities are taken form the .gro file. Otherwise new velocities are sampled from the Maxwell distribution.
(.gro files contain velocity data in the last three columns.)
genrstr -f TOPOLOGY.pdb -o RESTRAINTS.itp Attention: check if atoms are numbered in the right way, otherwise atom number of itp file might clash with numbers in the .pdb or .gro file.
Insert an include instruction for the RESTRAINTS.itp file in the TOPOLOGY.top file. Go to the [ moleculetype ] section in the .top file and add the lines:
#ifdef POSRES_XXX #include "RESTRAINTS.itp" #endifRestraints will be activated, when you specify
define=-DPOSRES_XXX
in the .mdp file.
color Display Background white
axes location off
On the VMD command line:
# only move residues 1 to 12 atomselect top "resid 1 to 12" > atomselect0 atomselect0 moveby {1 0 0} # e.g. e_x [atomselect top "all"] savepdb "MOVED.pdb"Alternative: use key '7' and move molecule with the mouse pointer. Then chose File > Save coordinates.
mol load pdb "FILE.pdb" atomselect top "not hydrogen" > atomselect0 atomselect0 writepdb "FILE_NO_H.pdb"
trjconv -b FIRST_TIME_STEP -e LAST_TIME_STEP -f INPUT.xtc -o OUTPUT.xtc
Chain names are not supported in .gro file format. So always keep a PDB for your current topology. A good choice is the PDB you obtain after setting the box dimensions for your system.
To remove periodicity of the trajectories, you need a few tricks. Assume, that you work with a small ligand and a larger binding partner (the protein). Further assume that you want to center the protein in the simulation box. In the original data, the ligand would usually diffuse around and interact with different mirror images of the protein. Now you can map back the position of the ligand such that said mirror image of the protein sits at the center of the box.
Create an index file for the protein using make_ndx:make_ndx -f SYSTEM.pdb -o PROTEIN.ndx
select the protein chain by typing chain
X
where X is the chain single letter code. Type q
to save and exit.
Map back coordinates using trjconv and this index file:
trjconv -n PROTEIN.ndx -s SYSTEM.tpr -f TRAJECTORY.xtc -o OUTPUT.xtc -pbc mol -ur compact -center
You can remove rotation of the protein, such that all ligand motion is relative to the protein. Add options
-fit rot
to the trjconv invokation.
pbc box_draw
export GMX_MAXBACKUP=-1