Talk:Mod:Hunt Research Group/gromacs viewing MD
Appearance
usefule info
- good gromacs manual pages
- turn of xmgrace specific formating add "-xvg none"
- to force a standard resize on Xmgrace default window
- create a file .Xdefaults in your home directory
- add the command "XMgrace*geometry: 1000x1000"
view data
- data stored in the ener.edr file
- file is compressed so you need to process it to look at the output
- use "energy" to access this information
- manual_energy
gmx energy -w
- will generate the following, now we want to look at the potential 10
- press return twice!
- this will open an xmgrace graph of the potential energy
- or 13 10
- will print both the energy and the temperature
GROMACS: gmx energy, version 2016.5 Executable: /opt/local/bin/gmx Data prefix: /opt/local Working dir: /Users/tricia/files/work/trajectories/me_bmimntf2 Command line: gmx energy -w Opened ener.edr as single precision energy file Select the terms you want from the following list by selecting either (part of) the name or the number or a combination. End your selection with an empty line or a zero. ------------------------------------------------------------------- 1 Bond 2 Angle 3 Fourier-Dih. 4 LJ-14 5 Coulomb-14 6 LJ-(SR) 7 Disper.-corr. 8 Coulomb-(SR) 9 Coul.-recip. 10 Potential 11 Kinetic-En. 12 Total-Energy 13 Temperature 14 Pres.-DC 15 Pressure 16 Constr.-rmsd 17 Box-X 18 Box-Y 19 Box-Z 20 Volume 21 Density 22 pV 23 Enthalpy 24 Vir-XX 25 Vir-XY 26 Vir-XZ 27 Vir-YX 28 Vir-YY 29 Vir-YZ 30 Vir-ZX 31 Vir-ZY 32 Vir-ZZ 33 Pres-XX 34 Pres-XY 35 Pres-XZ 36 Pres-YX 37 Pres-YY 38 Pres-YZ 39 Pres-ZX 40 Pres-ZY 41 Pres-ZZ 42 #Surf*SurfTen 43 T-System 44 Lamb-System
- running this will produce a data file, for example for the total energy (15)
Statistics over 100001 steps [ 0.0000 through 100.0000 ps ], 1 data sets All statistics are over 1001 points (frames) Energy Average Err.Est. RMSD Tot-Drift ------------------------------------------------------------------------------- Pressure 215.175 22 531.029 71.41 (bar) Executing 'xmgrace -nxy energy.xvg &'
- to write to a file, this will run the energy options and print what you select to a xmgrace file
- in this case I asked for the pressure and it is in pressure.xvg
gmx energy -f ener.edr -o pressure.xvg
- you can select range of timeframes
- -b time (first frame)
- -e time (last frame)
- -skip int (skip number of frames)
convert *.gro file
- the final geometry is in the *.gro file
- convert to a pdb with
gmx editconf -f confout.gro -o confout.pdb
viewing gromacs binary files
- view files
gmx dump -s topol.tpr gmx dump -e ener.edr gmx dump -p topol.top gmx dump -f traj.trr gmx dump -f traj.xtc
view trajectory files
- two trajectory output files
- traj.trr coordinates,velocities,energies as requested in .mdp file
- traj_comp.xtc compressed format for trajectories
- quick look inside the file
gmx check -f traj.trr
- view whole file
gmx dump -f traj.trr | less
- trjconv process trajectory files 1
- manual_trjconv
- input files are .xtc, .trr
gmx trjconv -f traj_comp.xtc -o traj_out.gro gmx trjconv -f traj_comp.xtc -skip 10 -o traj_out.gro
- trajectory process trajectory files 2
- manual_trajectory
- input files are .xtc, .trr
gmx trajectory -f input_file -o
create an rdf
- comments
- 1 must first create an index file
- 2 then create the rdf
- 3 then plot with xmgrace
- 1 create index file (index.ndx)
gmx make_ndx -f topol.tpr
- will bring up a menu
- most likely you want to do an atom-atom RDF for a particular atom type
- look in the confout.pdb file for the atom types
- so type t C2 (for the C2 carbon of the imidazolium)
- see below this becomes index 4
- and perhaps the central N of the NTf2 so type t NBT
- then q to quit
Analysing residues not classified as Protein/DNA/RNA/Water and splitting into groups... 0 System : 10240 atoms 1 Other : 10240 atoms 2 c4c : 6400 atoms 3 tf2 : 3840 atoms nr : group '!': not 'name' nr name 'splitch' nr Enter: list groups 'a': atom '&': and 'del' nr 'splitres' nr 'l': list residues 't': atom type '|': or 'keep' nr 'splitat' nr 'h': help 'r': residue 'res' nr 'chain' char "name": group 'case': case sensitive 'q': save and quit 'ri': residue index > t C2 Found 256 atoms with type C2 4 C2 : 256 atoms > t NBT Found 256 atoms with type NBT 5 NBT : 256 atoms >q
- create rdf
- input is traj file so -f *.tff
- index file is next so -n index.ndx
- output will go to an xmgrace file so -o *.xvg
- NOTE you can turn off the xmgrace formatting with -xvg none
gmx rdf -f traj_th.trr -n index.ndx -o rdf-cc.xvg gmx rdf -f traj_th.trr -n index.ndx -xvg none -o rdf-cc_csv
- first select the reference atom, in this case C2 from Group 4 so type 4
- then select the atom to generate rdf with respect to the reference (C2) so 4 for C-C and 5 for C-N
- then control-D to exit
GROMACS: gmx rdf, version 2016.5 Executable: /opt/local/bin/gmx Data prefix: /opt/local Working dir: /Users/tricia/files/work/trajectories/me_bmimntf2 Command line: gmx rdf -f traj_th.trr -n index.ndx -o rdf-cc.xvg Available static index groups: Group 0 "System" (10240 atoms) Group 1 "Other" (10240 atoms) Group 2 "c4c" (6400 atoms) Group 3 "tf2" (3840 atoms) Group 4 "C2" (256 atoms) Group 5 "NBT" (256 atoms) Specify a selection for option 'ref' (Reference selection for RDF computation): (one per line, <enter> for status/groups, 'help' for help)
- 3 generate the graph
- in this case we asked for the output file rdf-cc.xvg
- you can also look inside this file
xmgrace -nxy rdf-cc.xvg &
vmd script to read files
- use the following script to load into vmd
- copy to file load.tcl
- in vmd type source load.tcl
- then type load
proc load {args} { display projection Orthographic display nearclip set 0.000000 display farclip set 10.000000 display depthcue off axes location off display resize 700 700 color Display Background iceblue #add manually #color Name C grey #color Name F cyan mol new traj_out.gro type gro # basic representation mol delrep 0 top mol selection {all} mol color Name mol material Opaque mol representation DynamicBonds 1.900000 0.100000 12.000000 mol addrep top mol selection {all} mol representation VDW 0.30 30.0 mol addrep top }