Data objects

class mdk::Chains

This data structure contains all the data pertaining to chains, especially the pairs, triples etc. in the model. It’s here due to similarity of computation and some degree of reuse of the same data.

The definitions of pairs, triples etc. follow convention from CPC14.pdf.

Public Functions

Chains() = default
explicit Chains(Model const &model)

Generate a Chains structure for a given model.

Parameters

model – The model, chain data whereof we wish to obtain.

inline bool sepByAtLeastN(int i1, int i2, int n) const

Check bond distance between residues.

Parameters
  • i1 – First residue

  • i2 – Second residue

  • n – Bond offset

Returns

true if residues i1 and i2 are either in separate chains or in a single chain but separated by at least n bonds.

Bytes tuples(int k) const

Create an array of tuple indicators.

Parameters

k – Tuple size

Returns

An array of size model->n, where tuples(k)[i] is 1 if a tuple (i-k+2, …, i+1) is entirely contained in a chain, and 0 otherwise.

Bytes nativeTuples(int k) const

Create an array of native tuple indicators.

Parameters

k – Tuple size

Returns

An array of size model->n where tuples(k)[i] is 1 if a tuple (i-k+2, …, i+1) is entirely contained in a structured part, and 0 otherwise.

Public Members

Model const *model = nullptr

Const ptr to an underlying model (necessarily it must have at least as long a lifetime as this class).

Integers chainIdx

chainIdx[i] is the index of the chain for residue i, or -1 if a residue is in no chain.

Bytes isTerminal

isTerminal[i] = 1 if the i’th residue is first or last in the chain (and thus lacks a neighbor), or 0 otherwise.

Bytes pairs

pairs[i] = 1 if the pair (i, i+1) is entirely in one chain, or 0 otherwise. Result of tuples(2). Used in harmonic tether forcefield.

Bytes triples

triples[i] = 1 if the triple (i-1, i, i+1) is entirely in one chain, or 0 otherwise. Result of tuples(3). Used for QA (in computing n, h) and for bond angle potentials.

Bytes quads

quads[i] = 1 if the quadruple (i-2, i-1, i, i+1) is entirely in one chain, or 0 otherwise. Result of tuples(4). Used in dihedral potential.

Bytes nativeTriples

nativeTriples[i] = 1 if the triple (i-1, i, i+1) is entirely in a structured part, or 0 otherwise. Result of nativeTuples(3). Used in native bond angle potential.

Bytes nativeQuads

nativeQuads[i] = 1 if the quadruple (i-2, i-1, i, i+1) is entirely in a structured part, or 0 otherwise. Result of nativeTuples(4). Used in native dihedral potentials.

class mdk::Charges : public Scalars

A data structure containing the charges of residues in a model, as derived from a parameter file, in an array form.

Public Functions

Charges() = default
Charges(Model const &model, param::Parameters const &params)
class mdk::Masses : public Scalars

Data class containing masses associated with residues, in an array form.

Public Functions

Masses() = default
explicit Masses(Model const &model)