Skip to content
Raúl Mera A. edited this page Dec 6, 2024 · 13 revisions

Units

goMD uses Angstroems for lengths and degrees for angles.

Using goMD

In general, goMD is called in the following way:

gomd [-skip=X -begin=Y] task molfilename trajname task_specific_arguments

The format of both the moleculefile as well as that of the trajectory are determined by the respective file's extension. X and Y are integers which allow to read only every X frames, and to start reading in the Yth frame. By default, goMD starts reading from the first frame, and doesn't skip any frame between reads.

  • Supported formats for the molecule file are: PDB, GRO and XYZ
  • Supported formats for the trajectory file are: DCD, multi-PDB, multi-XYZ, old-AMBER (crd) and XTC. XTC requires the xdrfile library, which is included in the binary distribution.

The tasks_specific_arguments often involve goMD selections

In most cases, the tasks calculate one or more properties (distance, angle, Ramachandran angles, etc) on one or more goMD selections, for each frame. Thus, goMD will print a series of numbers for each frame read. There are some exceptions to this behavior, for properties that only make sense for a set of frames, such as the RMSF or the RDF. In those cases, the numbers are still printed, but are irrelevant. Only the last set of number printed, corresponding to the last frame, are meaningful (in the case of RDF) or a separate file is written with the relevant data (in the case of the RMSF).

Selections

goMD selections are defined in the following way: "RESID1,RESID2,RESID3-RESID3+N,RESIDN CHAIN ATNAME1,ATNAME2" (quotation marks included). RESID are residue numbers (values for the residue identifier field in a PDB file). They can be separated by commas or, to specify a range, with dashes: 12,13,120,125-128,145 The former would select the residues 12,13,120,125,126,127,128,145 CHAIN must be a chain identifier such as "A". If chain is "ALL", every chain will be used. ATNAME is a PDB atom name such as CA (alpha carbon). Hydrogen names may vary with the force-field employed. if ALL is given, as the first atom name, all atoms in the selected residues will be considered.

Examples of valid selections are:

  • "3-20 A C,CA,N,O" This selects all backbone atoms for the residues 3 to 20 in the chain A.
  • "1,5,10,14 ALL CA" This selects the alpha carbon from residues 1,5,10 and 14 in all chains.
  • "1,3-10 B ALL" This selects all atoms from residues 1 and 3 to 10 in the chain B.

goMD output

Most of the goMD tasks (see below) will print the results to the screen (stdout), one line of output per frame. Each line contains the frame number (starting from 0) and the output fields. These will depend on the task, and on the selections given. For instance, this call:

gomd distance file.pdb traj.dcd "1 A CA" "20 A CA" "2 A ALL" "30 A ALL"

Will print several lines (as many as frames in traj.dcd). Each lines will be of the form:

N  distance_1-20  distance_2-30

Where N is the frame number, distance_1-20 is the distance between the alpha carbons of the residues 1 and 20 of the chain A (first and second selection) and distance_2-30 will be the distance between the centers of mass of residues 2 and 30 of the chain A (third and fourth selections)

A few lines of output could be:

1  10.340  12.011
2   9.800  13.001
3  11.501  11.587
...

Other tasks will print different amounts of numbers per line (for instance, the task Angle prints 1 number for every 3 selections it is given). In general, you'll want to redirect goMD's output to a file, and use one of the included scripts, to plot the data.

There are a few cases where a task does not print useful information in this fashion. The RDF tasks, which calculates radial distribution functions, does not produce useful output for each frame. Rather, all the frames are combined to produce the output. In this task, each Nth line will contain the "updated" RDF of the N lines read so far. This means that only the last line contains the RDF for the whole trajectory.

Tasks

RMSD

Obtains the RMSD of the given selections against the coordinates in the reference PDB file for those selections.

gomd RMSD pdbname trajname "selection1" "selection2" ... "selectionN"
  • Example
gomd RMSD file.pdb traj.dcd  "122-143 A CA,C,O,N"

For each frame in traj.dcd, it will print -to the standard output- the RMSD for the selection (backbone of the residues 122-143 of the chain A) against the same selection in file.pdb

RMSF

Obtains the RMSF (root of the mean square fluctuations) of the given selection along the trajectory. As these values are not defined for each frame, goMD will print zeros to the screen while frames are processed. The RMSF values will be written in the end to a file named RMSF.dat

gomd RMSF pdbname trajname "selection"
  • Example
gomd rmsf file.pdb traj.xtc "1-153 ALL CA"

Will write the RMSF of the alpha-carbons of residues 1-153 of all chains to a file named RMSF.dat.

PerAtomRMSD

Obtains the per-atom RSD of the given selections against the coordinates in the reference PDB for those atoms.

gomd PerAtomRMSD pdbname trajname "selection" 
  • Example
gomd peratomrmsd file.pdb traj.xtc "1-10 B CA"

For each frame in traj.xtc, it will print -to the standard output- the RSD for the all the atoms in the selection selection (backbone of against the corresponding atoms in file.pdb.

PerResidueRMSD

Obtains the per-residue RSMD of the given chains against the coordinates in the reference PDB for those residues. Chains are given as a single string, e.g. "ABC". If the string "ALL" is given, all chains are considered. Additionally the name of a backbone atom that is present in all residues needs to be given (e.g. "CA" for atomistic structures and "BB" for Martini 3 structures). The third argument "com" can be additionally given. If given, it will cause goMD to compute the distance between the center of mass of each residue to the center of mass of the residue in the reference structure.

gomd  PerResidueRMSD pdbname trajname "chains" "backboneatomname"
  • Example
gomd perresiduermsd file.pdb traj.crd "AB" "BB"

Will print, for each frame, the per-residue RMSD of each residue in chains A and B against the residue in file.pdb. The name "BB" is the name of a backbone atom, in this case, the name of the Martini 3 name for the backbone bead.

Ramachandran

Given a series of residue ID and chains, will obtain Ramachandran angles for each residue (note that Ramachandran angles are not defined for the first or last residues in a chain!), on each frame of the trajectory. The purpose is to follow a few Ramachandran angles along a trajectory.

After the residue/chain list, the RGB flag can be given, followed by the total number of frames in the trajectory. If these are given, goMD will, in addition to each Ramachandran angle pair, print RGB values for suggested colors for each value, based on both the number of angles requested, and the number of frames that will be read (i.e. taking into account the -begin and -skip flags, if used).

gomd ramachandran pdbname trajname "RESIDUEID1 CHAIN1" ... "RESIDUEIDN CHAINN" [RGB NUMBEROFFRAMES]
  • Examples
gomd ramachandran file.gro traj.xtc "2 A" "3 A" "4 A"

Will print, for each frame, values for the phi and psi Ramachandran angles for residues 2, 3, and 4 in the chain A.

gomd ramachandran file.pdb traj.dcd "5 A" "10 A" "6 B" "11 B"  RGB 1000

Will print, for each frame, values for the phi and psi Ramachandran angles for residues 5 and 10 of the chain A and 6 and 11 of the chain B. In addition, for each of this residues, and after the respective Ramachandran angles, 3 numbers will be printed, corresponding to the RGB values specifying a suggested color for the corresponding point in the plot. The trajectory is assumed to have 1000 frames, information that will be used to determine the colors.

ClosestN

Given a selection, plots the distances for the closest N of an also given list of residue names to the selection, for each frame.

gomd ClosestN pdbname xtcname "selection" "residuename1 residuename2 residuenameM" N

Where N is a positive integer. Residue names are given in 3 letter format and refer to the residues that will be considered solvent (commonly, water). Keep in mind that the name for the water molecules will vary with the force-field used (SOL, HOH, WAT, etc). Distances of a residue with itself will not be considered.

  • Example
gomd closestn file.pdb traj.dcd "124 A ALL" "HOH" 5

This will print, for each frame, the distances (in A) to the 5 closest waters molecules (Residue name HOH) to any atom of the residue 124, chain A, (note that the distances printed may correspond to different water molecules in different frames)

WithinCutoff

Similar to the previous but returns the number of residues of the type residuename1 or residuename2, etc within R Angstroms of selection in each frame.

gomd WhithinCutoff pdbname xtcname "selection" "residuename1 residuename2 residuenameM" R

Where R is a positive float. The rest of the syntax is equivalent to that for ClosestN.

  • Example
gomd withincutoff file.pdb traj.crd "124 A ALL" "HOH" 4.5

This will print, for each frame, the number of water molecules found within 4.5 A of any atom of the residue 124, chain A.

RDF

Similar to the previous but obtains the RDF (radial distribution function) or MDDF (minimum distance distribution function), depending on whether the selection contains one atom, or more, respectively. The RDF or MDDF will be obtained for residues of the type residuename1 or residuename2, with respect to the selection "selection". Note that goMD's definition of MDDF reduces to the RDF if they selection is sphertically symmetric.

gomd RDF  pdbname xtcname "selection" "residuename1 residuename2 residuenameM" 
  • Example
gomd rdf file.pdb traj.xtc "63 B ALL" "HOH"

This will calculate the MDDF (as the selection contains a whole residue) for water molecules around any atom of the residue 63, chain B. Note that, for each frame, the MDDF with the trajectory so far will be printed. I.e. only the final line printed will correspond to the MDDF for the whole trajectory.

Distance

Obtains the distance between pairs of selections for each frame of the trajectory. An even number of selections must be given. If a selection has more than one atom, the center of mass for that selection will be used.

gomd distance pdbname xtcname "selection1" "selection2" ... "selectionN" 
  • Example
gomd distance file.pdb traj.dcd "21 A ALL" "30 A ALL"  "124 A CA" "124 B CA"

This will print, for each frame, 2 distances: That between the centers of mass of residues 21 and 30, chain A., and that between the alpha carbons of residues 124 in chain A and B.

Angle

Obtains the angle between triplets of consecutive selections selections, for each frame of the trajectory.
The number of given selections must be a multiple of 3. If a selection has more than one atom, the center of mass for that selection is used.

gomd angle pdbname xtcname "selection1" "selection2" "selection3" ... "selectionN" 
  • Example
gomd angle file.pdb traj.dcd "63 A ND2" "154 A ZN" "80 A ND2"

This will print, for each frame, the angle between the delta 2 nitrogen of residue 63, the Zn(II) 154 and the delta 2 nitrogen of residue 80. Note that more angles can be requested by simply adding triplets of selections. All angles requested will be printed, in order, in each line.

Dihedral

Obtains the dihedral angles between consecutive quadruplets of selections (i.e. the number of selections given must be a multiple of 4. If a selection has more than one atom, the center of mass for that selection is used.

gomd dihedral pdbname xtcname "selection1" "selection2" "selection3" "selection4" ...  "selectionN"
  • Example
gomd dihedral file.pdb traj.xtc  "120 A CA" "125 A CA" "131 A CA" "140 A CA"

This will print, for each frame of traj.xtc, the dihedral between the alpha carbons of the residues 120,125,131 and 140 of the chain A. Note that more dihedrals can be requested by adding more quadruplets of selections.

Shape

Obtains the Planarity (oblate distortion) an Elongation (prolate distorion) percentages for the selections.

gomd Shape pdbname xtcname "selection1" "selection2" ... "selectionN" 
  • Example
gomd shape file.pdb traj.crd  "122-143 A CA"  "122-143 B CA"

This will print, for each frame in traj.crd, 4 numbers: The planarity and elongation percentage for the alpha carbons in the residues 122-143, chain A, and the corresponding values for the alpha carbons of residues 122 to 143, chain B.

PlanesAngle

For every 2 selections, calculate the best plane passing through the atoms of each selection, and then returns the angles (in degrees) between the normal vector to each plane. An even number of selections must be given.

gomd planesangle pdbname xtcname "selection1" "selection2" ... "selection(N-1)" "selectionN"
  • Example
gomd planesangle file.pdb traj.xtc "90-96,100-110,114-120 A CA" ""90-96,100-110,114-120 F CA"

This will print, for each frame in traj.xtc, the angle between the best plane passing through the alpha carbons of residues 90-96,100-110 and 114-120 of the chain A, and the best plane passing though the alpha carbons of the same residues, in the chain F.

FixGMX

Will print a "fixed" version a Gromacs PDB, with the chains restored, and exit. The chain identifiers will be added in the following way: The first lines will be assigned chain "A". Whenever the residue number of a residue is smaller than the residue number of a previous residue, a new chain will be assumed, which will be assigned the chain "B", and so on with "C", "D", etc. This task doesn't require a trajectory. Nevertheless, goMD always expects a trajectory to be given. Since goMD accepts PDB-formatted trajectories, the solution to this problem is to simply give the structure twice.

gomd fixgmx pdbname pdbname
  • Example
gomd fixgmx file.pdb file.pdb

Will print a new PDB file called Fixed-file.pdb containing a PDB-standard-formatted version of the Gromacs-PDB-formatted file.pdb, including the chain fields. Note that file.pdb is given twice.

Super

Superimposes the whole trajectory to the reference structure considering the atoms in selection to calculate the superposition. In order to employ the LOVO procedure, instead of defining a selection, use the -lovo option (see below). Will save the superimposed trajectory in DCD format and print meaningless numbers (zeroes) to the screen.

gomd super pdbname xtcname "selection"

Average

Prints the averaged structure over the trajectory (for each atom, the coordinates will be the average coordinates over the trajectory). Note that this task does not take a goMD selection.

gomd average pdbname xtcname 

InterByRes (experimental feature/task)

Takes 2 selections and, for each frame, prints the ID for the residues in each selection that are part of the interface between both selections in that frame. The residue IDs are returned as floatint point numbers (for instance 1.0, 50.0), but they are, of course, integer numbers, so the zero after the decimal point can be discarded safely. If both selections belong to different chains, the residues for the second selections will be printed as negative numbers, just do distinguish between chains.

gomd interByRes pdbname xtcname "selection1" "selection2"
  • Example
gomd interbyres file.pdb traj.dcd "1-30 A ALL" "1-30 B ALL"

Will print, for each frame, the ID of the residues that form part of the interface between residues 1-30 of the chain A and 1-30 of the chain B. Blank spaces will be written in place of residues not in the interface. The residue IDs will be printed with a meaningless decimal point, and the residues of the chain B will be printed with a minus sign. Some lines from this run could be something like:

1  1.0     5.0     7.0  8.0  10.0                                            -1.0       -4.0       -7.0        -10.0        
2  1.0             7.0  8.0  10.0                                            -1.0           -5.0   -7.0        -10.0   
3  1.0     5.0     7.0  8.0  10.0                                            -1.0       -4.0       -7.0                      

A python script is provided to plot this data (See section plotting).

LOVO superposition calculation

While not strictly a task, goMD can employ LOVO (see: 10.1371/journal.pone.0119264, 10.1186/1471-2105-8-306) to find the optimal atoms from a selection to superimpose. LOVO is invoked with the option

gomd -lovo N task pdbname xtcname "selection"

Where N is a number larger than 0, and one every N frames will be reading during the LOVO procedure. The lovo results will be printed in goMD and Gromacs format. The task will be performed afterwards. Reasonable task options are "stop" (dummy task that does nothing after printing the LOVO results) and "super" (which will superimpose the whole trajectory based on the index determined in the LOVO procedure).

  • Example:
gomd -lovo 1 stop file.pdb traj.xtc "1-153 A CA"

This will determine the residues with the most rigid/less mobile alpha carbons along the trajectory, among the 1-153 residues of the chain A.