pulsatrix 1.1.0
Loading...
Searching...
No Matches
protein_structure.hpp File Reference

Protein structures (PLM-4): PDB and mmCIF coordinates, residue distances and true contacts, to check a protein language model's predicted contacts against. More...

#include <cstdint>
#include <map>
#include <optional>
#include <string>
#include <string_view>
#include <vector>
Include dependency graph for protein_structure.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  pulsatrix::Point3
 A position in Ångström. More...
 
struct  pulsatrix::StructureResidue
 One residue of a chain and its atoms. More...
 
struct  pulsatrix::StructureChain
 A chain's residues, in file order. More...
 
struct  pulsatrix::ProteinStructure
 The protein chains of a structure's first model. More...
 
struct  pulsatrix::ContactMap
 A square matrix over a sequence's residue pairs, row-major: predicted contact probabilities, distances, or true contacts. More...
 

Namespaces

namespace  pulsatrix
 

Enumerations

enum class  pulsatrix::ContactAtom { pulsatrix::Beta , pulsatrix::Alpha , pulsatrix::VirtualBeta }
 Which atom stands for a residue in residue distances. More...
 

Functions

ProteinStructure pulsatrix::ParsePdb (std::string_view text)
 Reads PDB-format text: the ATOM records, and the HETATM records of selenomethionine, of the first model.
 
ProteinStructure pulsatrix::ParseMmcif (std::string_view text)
 Reads mmCIF text: the _atom_site loop, with the same choices as ParsePdb. Chains and residue numbers are the author's (auth_asym_id, auth_seq_id), as in PDB files, so both formats of one entry give the same structure.
 
ProteinStructure pulsatrix::ReadStructure (const std::string &path)
 Reads a structure file: mmCIF for .cif or .mmcif, PDB format otherwise (.pdb, .ent).
 
ContactMap pulsatrix::ResidueDistances (const StructureChain &chain, ContactAtom atom=ContactAtom::Beta)
 Distances between the residues of chain, in Ångström, L x L for its L residues. A residue missing the atoms atom needs gives NaN in its row and column.
 
ContactMap pulsatrix::TrueContacts (const StructureChain &chain, double threshold=8.0, ContactAtom atom=ContactAtom::Beta)
 True contacts: 1 where two residues are closer than threshold (8 Å by convention), 0 where they aren't, and NaN where a distance is unknown.
 

Detailed Description

Protein structures (PLM-4): PDB and mmCIF coordinates, residue distances and true contacts, to check a protein language model's predicted contacts against.