nativecontacts

Define and track “native” contacts as determined by a simple distance cut-off.

nativecontacts [<mask1> [<mask2>]] [writecontacts <outfile>] [resout <resfile>][noimage] [distance <cut>] [out <filename>] [includesolvent]
 [ first | reference | ref <name> | refindex <#> ][resoffset <n>] [contactpdb <file>] [pdbcut <cut>] [mindist] [maxdist][name <dsname>] [byresidue] [map [mapout <mapfile>]] [series [seriesout <file>]][savenonnative [seriesnnout <file>] [nncontactpdb <file>]][resseries { present | sum } [resseriesout <file>]] 

<mask1> First mask to calculate contacts for.
[<mask2>] (Optional) Second mask to calculate contacts for.
[writecontacts <outfile>] Write information on native contacts to <outfile> (STDOUT if not specified).
[resout <resfile>] File to write contact residue pairs to.
[noimage] Do not image distances.
[distance <cut>] Distance cutoff for determining native contacts in Angstroms (default 7.0 Ang).
[out <filename>] File to write number of native contacts and non-native contacts.
[includesolvent] By default solvent molecules are ignored; this will explicitly include solvent molecules.
[first | reference | ref <name> | refindex <#>] Reference structure to use for determining native contacts.
[resoffset <n>] (byresidue only) Ignore contacts between residues spaced less than <n> residues apart in sequence.
[contactpdb <file>] Write PDB with B-factor column containing relative contact strength for native contacts (strongest is 100.0).
[pdbcut <cut>] If writing contactpdb, only write contacts with relative contact strength greater than <cut>.
[mindist] If specified, determine the minimum distance between any atoms in the mask(s).
[maxdist] If specified, determine the maximum distance between any atoms in the mask(s).
[name <dsname>] Data set name.
[byresidue] Write out the contact map by residue instead of by atom.
[map] Calculate matrices of native contacts ([nativemap]) and non-native contacts ([nonnatmap]). These matrices are normalized by the total number of frames, so that a value of 1.0 means “contact always present”. If byresidue specified, the values for each individual atom pair are summed over the residues they belong to (this means for byresidue values greater than 1.0 are possible).
[mapout <mapfile>] Write native/non-native matrices to ’native.<mapfile>’ and ’nonnative.<mapfile>’ respectively.
[series] Calculate native contact time series data, 1 for contact present and 0 otherwise.
[seriesout <file>] Write native contact time series data to file.
[savenonnative] Save non-native contacts; series must also be specified.
[seriesnnout <file>] Write non-native contact time series data to file.
[nncontactpdb <file>] Write PDB with B-factor column containing relative contact strength for non-native contacts (strongest is 100.0). [resseries {present | sum} Create contacts time series by residue; series must also be specified. present Record a 1 if any contact is present and 0 if no contact is present for the residue pair. sum The sum of all individual contacts is recorded for the residue pair.
[resseriesout <file>] Write residue time series data to <file>.

Data Sets Created:
<dsname>[native] Number of native contacts.
<dsname>[nonnative] Number of non-native contacts.
<dsname>[mindist] (mindist only) Minimum observed distance each frame.
<dsname>[maxdist] (maxdist only) Maximum observed distance each frame.
<dsname>[nativemap] (map only) Native contacts matrix (2D).
<dsname>[nonnatmap] Non-native contacts matrix (2D).
<dsname>[NC] Native contacts time series.
<dsname>[NN] Non-native contacts time series.
<dsname>[NCRES] Residue native contacts time series.
<dsname>[NNRES] Residue non-native contacts time series.

Define and track “native” contacts as determined by a simple distance cut-off, i.e. any atoms which are closer than <cut> in the specified reference frame (the first frame if no reference specified) are considered a native contact. If one mask is provided, contacts are looked for within <mask1>; if two masks are provided, only contacts between atoms in <mask1> and atoms in <mask2> are looked for (useful for determining intermolecular contacts). By default only native contacts are tracked. This can be changed by specifying the savenonnative keyword. The time series for contacts can be saved using the series keyword; these can be further consolidated by residue using the resseries keyword. When using <resseries> the data set index is calculated as (r2 * nres) + r1 so that indices can be matched between native/non-native contact pairs. Non-native residue contact legends have an nn_ prefix.

Native contacts that are found are written to the file specified by writecontacts (or STDOUT) with format:

# Contact    Nframes    Frac.    Avg    Stdev

Where Contact takes the form ’:<residue1 num>@<atom name>_:<residue2 num>@<atom name>, Nframes is the number of frames the contact is present, Frac. is the total fraction of frames the contact is present, Avg is the average distance of the contact when present, and Stdev is the standard deviation of the contact distance when present. If resout is specified the total fraction of contacts is printed for all residue pairs having native contacts with format:

#Res1    #Res2    TotalFrac    Contacts

Where #Res1 is the first residue number, #Res2 is the second residue number, TotalFrac is the total fraction of contacts for the residue pair, and Contacts is the total number of native contacts involved with the residue pair. Since TotalFrac is calculated for each pair as the sum of each contact involving that pair divided by the total number of frames, it is possible to have TotalFrac values greater than 1 if the residue pair includes more than 1native contact. During trajectory processing, non-native contacts (i.e. any pair satisfying the distance cut-off which is not already a native contact) are also searched for. The time series for native contacts can be saved as well, with 1 for contact present and 0 otherwise (similar to the hbond command). This data can be subsequently analyzed using the lifetime command.

Contact maps (matrices) are generated for native and non-native contacts. If byresidue is specified, contact maps are summed over residues, and contacts between residues spaced <resoffset> residues apart in sequence are ignored.
If contactpdb is specified a PDB is generated containing relative contact strengths in the B-factor column. The relative contact strength is normalized so that a value of 100 means that atom participated in the most contacts with other atoms.

Example command looking for contacts between residues 210 to 260 and residue named NDP, using reference structure ’FtuFabI.WT.pdb’ to define native contacts:

parm FtuFabI.parm7
 trajin FtuFabI.nc
 reference FtuFabI.WT.pdb
 nativecontacts name NC1 :210-260&!@H= :NDP&!@H= \   
 byresidue out nc.all.res.dat mindist maxdist \  
 distance 3.0 reference map mapout resmap.gnu \
 contactpdb Loop-NDP.pdb \
 series seriesout native.dat