Pteros  2.0
Molecular modeling library for human beings!
pteros Namespace Reference

Pteros namespace. More...

Classes

class  Atom
 Class which represents a single atom. More...
 
class  Atom_proxy
 Auxilary type used to incapsulate the atom and its current coordinates Used internally in Selection::operator[] and in iterator access to Selection. More...
 
class  Consumer
 Normal consumer. More...
 
class  Consumer_base
 Base class for asynchronous data analysis. More...
 
struct  Data_container
 Auxiliary container for sending data to consumers. More...
 
class  DCD_file
 Generic API for reading and writing any molecule file formats. More...
 
class  Distance_search_within
 Class for within searching. More...
 
struct  Energy_components
 Components of the non-bond energy. More...
 
class  Force_field
 Force field parameters of the system. More...
 
struct  Frame
 Definition of single trajectory frame. More...
 
struct  Frame_info
 Information about current frame, which is passed to Consumer for analysis along with the frame itself. More...
 
class  GNM
 Implementation of the Gaussian Network Model (GNM) protein model. More...
 
class  Grid
 Sorting the atoms from given selection into the cells of 3D grid with given dimensions. More...
 
class  GRO_file
 Reader for GRO files. It doesn't use VMD plugins because it doesn't support writing. More...
 
class  Gromacs_trajectory_file
 Base class for XTC and TRR readers. More...
 
class  MOL2_file
 Use VMD plugin for MOL2. More...
 
class  Mol_file
 Generic API for reading and writing any molecule file formats. More...
 
class  Options
 All options obtained from command line including nested options for tasks. More...
 
class  PDB_file
 Use VMD plugin for PDB. More...
 
class  Periodic_box
 Class encapsulating all operations with arbitrary triclinic periodic boxes This class stores the periodic box itself and also contains pre-computed matrices for converting laboratory coordinates to the coordinates in triclinic basis and vice versa. More...
 
class  Pteros_error
 Represents an error in the Pteros code. Used for all Pteros-related exceptions. More...
 
class  Q_file
 Reader for GRO files. It doesn't use VMD plugins because it doesn't support writing. More...
 
class  Selection
 Selection class. More...
 
class  Selection_parser
 Selection parser class. More...
 
class  System
 The system of atoms. More...
 
class  TNG_file
 Use VMD plugin for TNG. More...
 
class  Trajectory_processor
 The base class for trajectory processing It provides facilities for loading large trajectories by frames and to analyze each frame by user-defined function. More...
 
class  TRR_file
 TRR reader. More...
 
class  VMD_molfile_plugin_wrapper
 Generic API for reading and writing any molecule file formats. More...
 
class  XTC_file
 TRR reader. More...
 
class  XYZ_file
 Generic API for reading and writing any molecule file formats. More...
 

Typedefs

typedef boost::variant< float, int, std::string, std::shared_ptr< AstNode >> ast_element
 
typedef std::shared_ptr< AstNode > AstNode_ptr
 
typedef std::pair< int, int > Index_pair
 
typedef std::map< Index_pair, Atom_contact_info > Atom_contacts_t
 
typedef std::map< Index_pair, Residue_contact_info > Res_contacts_t
 
typedef std::map< int, Per_atom_stat > Per_atom_t
 
typedef std::map< int, Per_residue_stat > Per_res_t
 
typedef std::shared_ptr< FrameFrame_ptr
 
typedef Message_channel< std::shared_ptr< Data_container > > Data_channel
 
typedef unsigned short Mol_file_content
 
typedef Eigen::Ref< Eigen::Vector3f > Vector3f_ref
 
typedef Eigen::Ref< Eigen::Matrix3f > Matrix3f_ref
 
typedef Eigen::Ref< Eigen::VectorXf > VectorXf_ref
 
typedef Eigen::Ref< Eigen::MatrixXf > MatrixXf_ref
 
typedef Eigen::Ref< Eigen::Vector3i > Vector3i_ref
 
typedef const Eigen::Ref< const Eigen::Vector3f > & Vector3f_const_ref
 
typedef const Eigen::Ref< const Eigen::Matrix3f > & Matrix3f_const_ref
 
typedef const Eigen::Ref< const Eigen::VectorXf > & VectorXf_const_ref
 
typedef const Eigen::Ref< const Eigen::MatrixXf > & MatrixXf_const_ref
 
typedef const Eigen::Ref< const Eigen::Vector3i > & Vector3i_const_ref
 

Enumerations

enum  Codes {
  TOK_VOID, TOK_MINUS, TOK_UNARY_MINUS, TOK_PLUS,
  TOK_MULT, TOK_DIV, TOK_POWER, TOK_EQ,
  TOK_NEQ, TOK_LT, TOK_GT, TOK_LEQ,
  TOK_GEQ, TOK_X, TOK_Y, TOK_Z,
  TOK_OCC, TOK_BETA, TOK_OR, TOK_AND,
  TOK_NOT, TOK_WITHIN, TOK_SELF, TOK_BY,
  TOK_RESIDUE, TOK_NAME, TOK_RESNAME, TOK_TAG,
  TOK_TYPE, TOK_CHAIN, TOK_RESID, TOK_INDEX,
  TOK_RESINDEX, TOK_ALL, TOK_TO, TOK_INT,
  TOK_UINT, TOK_FLOAT, TOK_STR, TOK_POINT,
  TOK_VECTOR, TOK_PLANE, TOK_PRECOMPUTED, TOK_REGEX
}
 
enum  Contacts_def { CUT_OFF, VDW_RADII }
 
enum  HISTOGRAM_TYPE { HIST_LINEAR, HIST_CYLINDRICAL, HIST_SPHERICAL }
 
enum  {
  MFC_ATOMS = 0x01, MFC_COORD = 0x02, MFC_TRAJ = 0x04, MFC_TOP = 0x08,
  MFC_RAND = 0x10
}
 What is stored in file type?
 

Functions

void parse_command_line (int argc, char **argv, Options &toplevel, std::string task_tag, std::vector< Options > &tasks)
 
void parse_command_line (int argc, char **argv, Options &toplevel)
 
void search_contacts (float d, const Selection &sel, std::vector< Vector2i > &pairs, bool absolute_index, bool periodic, std::vector< float > *dist_vec)
 
void search_contacts (float d, const Selection &sel1, const Selection &sel2, std::vector< Vector2i > &pairs, bool absolute_index, bool periodic, std::vector< float > *dist_vec)
 
void search_within (float d, const Selection &src, const Selection &target, std::vector< int > &res, bool include_self=true, bool periodic=false)
 Search atoms from source selection around the traget selection Returns absolute indexes only!
 
void dssp_wrapper (pteros::Selection &sel, std::ostream &io)
 
std::string dssp_string (pteros::Selection &sel)
 
Selection operator| (const Selection &sel1, const Selection &sel2)
 
Selection operator& (const Selection &sel1, const Selection &sel2)
 
ostream & operator<< (ostream &os, const Selection &sel)
 
Selection operator- (const Selection &sel1, const Selection &sel2)
 
Energy_components non_bond_energy (const Selection &sel1, const Selection &sel2, float cutoff=0.25, int fr=-1, bool periodic=true)
 
float rmsd (const Selection &sel1, int fr1, const Selection &sel2, int fr2)
 
float rmsd (const Selection &sel1, const Selection &sel2)
 
Affine3f fit_transform (const Selection &sel1, const Selection &sel2)
 
void fit (Selection &sel1, const Selection &sel2)
 
pteros::Periodic_box get_Box (pteros::System &obj, int fr)
 
void set_Box (pteros::System &obj, int fr, const pteros::Periodic_box &data)
 
float get_Time (pteros::System &obj, int fr)
 
void set_Time (pteros::System &obj, int fr, float data)
 
Eigen::Vector3f get_XYZ (pteros::System &obj, int ind, int fr)
 
void set_XYZ (pteros::System &obj, int ind, int fr, const Eigen::Vector3f &data)
 
pteros::Atom get_Atom_data (pteros::System &obj, int fr)
 
void set_Atom_data (pteros::System &obj, int fr, const pteros::Atom &data)
 
pteros::Frame get_Frame_data (pteros::System &obj, int fr)
 
void set_Frame_data (pteros::System &obj, int fr, const pteros::Frame &data)
 
void search_contacts (float d, const Selection &sel, std::vector< Eigen::Vector2i > &pairs, bool absolute_index=false, bool periodic=false, std::vector< float > *dist_vec=nullptr)
 Search contacts within single selection Optionally returns distances for each pair. More...
 
void search_contacts (float d, const Selection &sel1, const Selection &sel2, std::vector< Eigen::Vector2i > &pairs, bool absolute_index=false, bool periodic=false, std::vector< float > *dist_vec=nullptr)
 Search contacts between two selections.
 
float get_mass_from_atom_name (std::string &name)
 
float angle_between_vectors (Vector3f_const_ref vec1, Vector3f_const_ref vec2)
 
Eigen::Vector3f project_vector (Vector3f_const_ref vec1, Vector3f_const_ref vec2)
 
float rad_to_deg (float rad)
 
constexpr long double operator""_deg (long double deg)
 
template<class T , int PyT>
PyObject * mapper (PyObject *pyobj, size_t &dim1, size_t &dim2)
 

Detailed Description

Pteros namespace.

Function Documentation

Selection pteros::operator| ( const Selection sel1,
const Selection sel2 
)

Parent selections are not modified.

Selection pteros::operator& ( const Selection sel1,
const Selection sel2 
)

Parent selections are not modified.

ostream& pteros::operator<< ( std::ostream &  os,
const Selection sel 
)

Outputs indexes as a space separated list

Selection pteros::operator- ( const Selection sel1,
const Selection sel2 
)

Parent selections are not modified.

Warning
This operator is not commutative!
Energy_components pteros::non_bond_energy ( const Selection sel1,
const Selection sel2,
float  cutoff = 0.25,
int  fr = -1,
bool  periodic = true 
)

If cutoff is 0 or negative computes all pairs of atoms (very slow for large selections) fr = -1 computes for current frame of selection 1.

float pteros::rmsd ( const Selection sel1,
int  fr1,
const Selection sel2,
int  fr2 
)
Parameters
sel1First selection
fr1Frame for first selection
sel2Second selection
fr2Frame for second selection
void pteros::search_contacts ( float  d,
const Selection sel,
std::vector< Eigen::Vector2i > &  pairs,
bool  absolute_index = false,
bool  periodic = false,
std::vector< float > *  dist_vec = nullptr 
)

Search contacts within single selection Optionally returns distances for each pair.