Coordination stats

namespace mdk
struct Stat
#include <Stat.hpp>

An object containing the coordination stats for a given residue. As opposed to the Fortran version, where the numbers represent the number of contacts formed, here it’s the number of slots remaining. This simplifies the checking procedure, as we can simply compare the coordination numbers with zero. We also provide facilities for manipulating these stats, such as addition etc. This object can also naturally represent a stat difference.

Public Functions

inline bool valid() const

Checks whether a stat is valid; in particular, one can check whether the formation of a contact will exceed the number of available slots this way.

Returns

Whether a stat is valid.

inline Stat &operator+=(Stat const &other)
inline Stat operator+(Stat const &other) const
inline Stat operator-() const
inline Stat &operator-=(Stat const &other)
inline Stat operator-(Stat const &other) const

Public Members

int8_t backbone = 0

Number of remaining backbone contacts that can be formed.

int8_t sidechain = 0

Number of remaining sidechain contacts that can be formed.

int8_t hydrophobicSS = 0

Number of remaining sidechain contacts that can be formed with hydrophobic residues.

int8_t polarSS = 0

Number of remaining sidechain contacts that can be formed with polar residues.

namespace mdk
class Stats : public mdk::SimulVar
#include <Stats.hpp>

An object containing stats for the residues. Also initializes these numbers in one place.

Public Types

enum Type

Type of a contact (backbone-backbone etc.).

Values:

enumerator BB
enumerator BS
enumerator SB
enumerator SS

Public Functions

virtual void bind(Simulation &simulation) override

Bind an object to a simulation.

Parameters

simulationSimulation to bind the object to.

inline void creationDiffs(int i1, int i2, Type type, Stat diffs[2]) const

Generate diffs for if a contact between residues i1 and i2 of type type were created. It’s inline so as for the compiler to insert it and not have to call the function.

Parameters
  • i1 – First residue.

  • i2 – Second residue.

  • type – Type of a contact.

  • diffs – An array of diffs; diffs[0] is the diff for the first residue, diffs[1] is the diff for the second residue.

Public Members

std::vector<Stat> stats

List of stats for each residue.

Private Members

Types const *types = nullptr

Types of amino acids.

std::vector<param::Polarization> polarization

List of polarization values taken from the param::Parameters object.