Sequence files

class mdk::seq::Sequence

A sequence file, i.e. a set of chains with optional interposed contact maps.

Public Functions

Model asModel() const

Create a Model from the sequence file. Positions are initialized to zero, thus invoking a function like morphIntoSAW is necessary. Contacts are assumed to be “NAT”, i.e. without specifying which is sidechain or backbone etc.

Returns

Resulting Model from the sequence file

Public Members

std::optional<double> screeningDist

Optional screening distance, as per README.txt.

std::vector<Chain> chains

Chains in the sequence file.

std::unordered_map<std::string, cmap::ContactMap> contactMaps

A map from the contact map path to a parsed contact map.

struct Chain

A single chain in the sequence file.

Public Members

std::vector<AminoAcid> codes

Amino acids comprising the chain.

std::vector<std::string> contactMaps

Paths to contact maps associated with the chain. Technically one could store cmap::ContactMap explicitly but we store paths in order to not duplicate contact maps.

class mdk::seq::LegacyParser

A parser of sequence files. Here we need an explicit path since the sequence files reference contact maps by relative path.

Public Functions

Sequence read(std::filesystem::path const &path)

Read a sequence from a file at path.

Parameters

path – Path to a file with the sequence.

Returns

Parsed sequence.