VinaLC: Parallel Molecular Docking Program |
Biochemical and Biophysical Systems Group |
#include <fstream>
#include <sstream>
#include <cctype>
#include <boost/utility.hpp>
#include <boost/optional.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/lexical_cast.hpp>
#include "parse_pdbqt.h"
#include "atom_constants.h"
#include "file.h"
#include "convert_substring.h"
#include "parse_error.h"
Classes | |
struct | stream_parse_error |
struct | parsed_atom |
struct | atom_syntax_error |
struct | atom_reference |
struct | movable_atom |
struct | rigid |
struct | non_rigid_parsed |
struct | parsing_struct |
struct | parsing_struct::node_t< T > |
struct | pdbqt_initializer |
Typedefs | |
typedef std::vector< movable_atom > | mav |
typedef std::pair< sz, sz > | axis_numbers |
typedef boost::optional < axis_numbers > | axis_numbers_option |
Functions | |
void | add_context (context &c, std::string &str) |
std::string | omit_whitespace (const std::string &str, sz i, sz j) |
template<typename T > | |
T | checked_convert_substring (const std::string &str, sz i, sz j, const std::string &dest_nature) |
parsed_atom | parse_pdbqt_atom_string (const std::string &str) |
unsigned | parse_one_unsigned (const std::string &str, const std::string &start, unsigned count) |
void | parse_two_unsigneds (const std::string &str, const std::string &start, unsigned count, unsigned &first, unsigned &second) |
void | parse_pdbqt_rigid (const path &name, rigid &r) |
void | parse_pdbqt_root_aux (std::istream &in, unsigned &count, parsing_struct &p, context &c) |
void | parse_pdbqt_root (std::istream &in, unsigned &count, parsing_struct &p, context &c) |
void | parse_pdbqt_branch (std::istream &in, unsigned &count, parsing_struct &p, context &c, unsigned from, unsigned to) |
void | parse_pdbqt_branch_aux (std::istream &in, unsigned &count, const std::string &str, parsing_struct &p, context &c) |
void | parse_pdbqt_aux (std::istream &in, unsigned &count, parsing_struct &p, context &c, boost::optional< unsigned > &torsdof, bool residue) |
void | parse_pdbqt_aux (std::stringstream &in, unsigned &count, parsing_struct &p, context &c, boost::optional< unsigned > &torsdof, bool residue) |
void | add_bonds (non_rigid_parsed &nr, boost::optional< atom_reference > atm, const atom_range &r) |
void | set_rotor (non_rigid_parsed &nr, boost::optional< atom_reference > axis_begin, boost::optional< atom_reference > axis_end) |
void | nr_update_matrixes (non_rigid_parsed &nr) |
template<typename B > | |
void | postprocess_branch (non_rigid_parsed &nr, parsing_struct &p, context &c, B &b) |
void | postprocess_ligand (non_rigid_parsed &nr, parsing_struct &p, context &c, unsigned torsdof) |
void | postprocess_residue (non_rigid_parsed &nr, parsing_struct &p, context &c) |
void | parse_pdbqt_ligand (const path &name, non_rigid_parsed &nr, context &c) |
void | parse_pdbqt_ligand (std::stringstream &ligSS, non_rigid_parsed &nr, context &c) |
void | parse_pdbqt_residue (std::istream &in, unsigned &count, parsing_struct &p, context &c) |
void | parse_pdbqt_flex (const path &name, non_rigid_parsed &nr, context &c) |
model | parse_ligand_pdbqt (const path &name) |
model | parse_ligand_pdbqt (std::stringstream &ligSS) |
model | parse_receptor_pdbqt (const path &rigid_name, const path &flex_name) |
model | parse_receptor_pdbqt (const path &rigid_name) |
typedef std::vector<movable_atom> mav |
typedef std::pair<sz, sz> axis_numbers |
typedef boost::optional<axis_numbers> axis_numbers_option |
void add_context | ( | context & | c, |
std::string & | str | ||
) |
Referenced by parse_pdbqt_aux(), parse_pdbqt_branch(), parse_pdbqt_flex(), parse_pdbqt_root(), and parse_pdbqt_root_aux().
References VINA_CHECK.
Referenced by parse_pdbqt_atom_string().
T checked_convert_substring | ( | const std::string & | str, |
sz | i, | ||
sz | j, | ||
const std::string & | dest_nature | ||
) |
References VINA_CHECK.
parsed_atom parse_pdbqt_atom_string | ( | const std::string & | str | ) |
References atom_type::acceptable_type(), is_non_ad_metal_name(), omit_whitespace(), string_to_ad_type(), substring_is_blank(), atom_type::xs, and XS_TYPE_Met_D.
Referenced by parse_pdbqt_branch(), parse_pdbqt_rigid(), and parse_pdbqt_root_aux().
unsigned parse_one_unsigned | ( | const std::string & | str, |
const std::string & | start, | ||
unsigned | count | ||
) |
void parse_two_unsigneds | ( | const std::string & | str, |
const std::string & | start, | ||
unsigned | count, | ||
unsigned & | first, | ||
unsigned & | second | ||
) |
Referenced by parse_pdbqt_branch(), and parse_pdbqt_branch_aux().
References rigid::atoms, atom_syntax_error::nature, parse_pdbqt_atom_string(), and starts_with().
Referenced by parse_receptor_pdbqt().
void parse_pdbqt_root_aux | ( | std::istream & | in, |
unsigned & | count, | ||
parsing_struct & | p, | ||
context & | c | ||
) |
References parsing_struct::add(), add_context(), atom_syntax_error::nature, parse_pdbqt_atom_string(), and starts_with().
Referenced by parse_pdbqt_root().
void parse_pdbqt_root | ( | std::istream & | in, |
unsigned & | count, | ||
parsing_struct & | p, | ||
context & | c | ||
) |
References add_context(), parse_pdbqt_root_aux(), and starts_with().
Referenced by parse_pdbqt_aux().
void parse_pdbqt_branch | ( | std::istream & | in, |
unsigned & | count, | ||
parsing_struct & | p, | ||
context & | c, | ||
unsigned | from, | ||
unsigned | to | ||
) |
References parsing_struct::add(), add_context(), parsing_struct::atoms, parsing_struct::immobile_atom, atom_syntax_error::nature, parsed_atom::number, parse_pdbqt_atom_string(), parse_pdbqt_branch_aux(), parse_two_unsigneds(), and starts_with().
Referenced by parse_pdbqt_branch_aux().
void parse_pdbqt_branch_aux | ( | std::istream & | in, |
unsigned & | count, | ||
const std::string & | str, | ||
parsing_struct & | p, | ||
context & | c | ||
) |
References parsing_struct::atoms, parse_pdbqt_branch(), and parse_two_unsigneds().
Referenced by parse_pdbqt_aux(), and parse_pdbqt_branch().
void parse_pdbqt_aux | ( | std::istream & | in, |
unsigned & | count, | ||
parsing_struct & | p, | ||
context & | c, | ||
boost::optional< unsigned > & | torsdof, | ||
bool | residue | ||
) |
References add_context(), parse_one_unsigned(), parse_pdbqt_branch_aux(), parse_pdbqt_root(), and starts_with().
Referenced by parse_pdbqt_ligand(), and parse_pdbqt_residue().
void parse_pdbqt_aux | ( | std::stringstream & | in, |
unsigned & | count, | ||
parsing_struct & | p, | ||
context & | c, | ||
boost::optional< unsigned > & | torsdof, | ||
bool | residue | ||
) |
References add_context(), parse_one_unsigned(), parse_pdbqt_branch_aux(), parse_pdbqt_root(), and starts_with().
void add_bonds | ( | non_rigid_parsed & | nr, |
boost::optional< atom_reference > | atm, | ||
const atom_range & | r | ||
) |
References non_rigid_parsed::atoms_atoms_bonds, non_rigid_parsed::atoms_inflex_bonds, atom_range::begin, DISTANCE_FIXED, atom_range::end, atom_reference::index, atom_reference::inflex, and VINA_RANGE.
Referenced by postprocess_branch().
void set_rotor | ( | non_rigid_parsed & | nr, |
boost::optional< atom_reference > | axis_begin, | ||
boost::optional< atom_reference > | axis_end | ||
) |
References non_rigid_parsed::atoms_atoms_bonds, non_rigid_parsed::atoms_inflex_bonds, DISTANCE_ROTOR, atom_reference::index, atom_reference::inflex, non_rigid_parsed::inflex_inflex_bonds, and VINA_CHECK.
Referenced by postprocess_branch().
void nr_update_matrixes | ( | non_rigid_parsed & | nr | ) |
References non_rigid_parsed::atoms, non_rigid_parsed::atoms_atoms_bonds, non_rigid_parsed::atoms_inflex_bonds, DISTANCE_FIXED, DISTANCE_VARIABLE, non_rigid_parsed::inflex, non_rigid_parsed::inflex_inflex_bonds, matrix< T >::resize(), and strictly_triangular_matrix< T >::resize().
Referenced by postprocess_branch(), postprocess_ligand(), and postprocess_residue().
void postprocess_branch | ( | non_rigid_parsed & | nr, |
parsing_struct & | p, | ||
context & | c, | ||
B & | b | ||
) |
References parsing_struct::node_t< T >::a, add_bonds(), non_rigid_parsed::atoms, parsing_struct::atoms, non_rigid_parsed::atoms_atoms_bonds, non_rigid_parsed::atoms_inflex_bonds, parsing_struct::axis_begin, parsing_struct::axis_end, atom::coords, strictly_triangular_matrix< T >::dim(), matrix< T >::dim_1(), matrix< T >::dim_2(), DISTANCE_FIXED, parsing_struct::essentially_empty(), parsing_struct::immobile_atom, parsing_struct::immobile_atom_coords(), non_rigid_parsed::inflex, parsing_struct::node_t< T >::insert(), parsing_struct::node_t< T >::insert_immobiles(), nr_update_matrixes(), parsing_struct::node_t< T >::ps, set_rotor(), VINA_CHECK, VINA_FOR_IN, and VINA_RANGE.
Referenced by postprocess_ligand(), and postprocess_residue().
void postprocess_ligand | ( | non_rigid_parsed & | nr, |
parsing_struct & | p, | ||
context & | c, | ||
unsigned | torsdof | ||
) |
References parsing_struct::atoms, non_rigid_parsed::ligands, nr_update_matrixes(), postprocess_branch(), and VINA_CHECK.
Referenced by parse_pdbqt_ligand().
void postprocess_residue | ( | non_rigid_parsed & | nr, |
parsing_struct & | p, | ||
context & | c | ||
) |
References parsing_struct::node_t< T >::a, non_rigid_parsed::atoms, parsing_struct::atoms, non_rigid_parsed::atoms_atoms_bonds, non_rigid_parsed::atoms_inflex_bonds, atom::coords, strictly_triangular_matrix< T >::dim(), matrix< T >::dim_1(), matrix< T >::dim_2(), parsing_struct::essentially_empty(), non_rigid_parsed::flex, parsing_struct::immobile_atom_coords(), non_rigid_parsed::inflex, parsing_struct::node_t< T >::insert_immobiles_inflex(), parsing_struct::node_t< T >::insert_inflex(), nr_update_matrixes(), postprocess_branch(), parsing_struct::node_t< T >::ps, VINA_CHECK, and VINA_FOR_IN.
Referenced by parse_pdbqt_flex().
void parse_pdbqt_ligand | ( | const path & | name, |
non_rigid_parsed & | nr, | ||
context & | c | ||
) |
References non_rigid_parsed::atoms, parsing_struct::atoms, non_rigid_parsed::atoms_atoms_bonds, strictly_triangular_matrix< T >::dim(), parse_pdbqt_aux(), postprocess_ligand(), stream_parse_error::to_parse_error(), and VINA_CHECK.
Referenced by parse_ligand_pdbqt().
void parse_pdbqt_ligand | ( | std::stringstream & | ligSS, |
non_rigid_parsed & | nr, | ||
context & | c | ||
) |
References non_rigid_parsed::atoms, parsing_struct::atoms, non_rigid_parsed::atoms_atoms_bonds, strictly_triangular_matrix< T >::dim(), parse_pdbqt_aux(), postprocess_ligand(), stream_parse_error::to_parse_error(), and VINA_CHECK.
void parse_pdbqt_residue | ( | std::istream & | in, |
unsigned & | count, | ||
parsing_struct & | p, | ||
context & | c | ||
) |
References parse_pdbqt_aux().
Referenced by parse_pdbqt_flex().
void parse_pdbqt_flex | ( | const path & | name, |
non_rigid_parsed & | nr, | ||
context & | c | ||
) |
References add_context(), non_rigid_parsed::atoms, non_rigid_parsed::atoms_atoms_bonds, strictly_triangular_matrix< T >::dim(), parse_pdbqt_residue(), postprocess_residue(), starts_with(), stream_parse_error::to_parse_error(), and VINA_CHECK.
Referenced by parse_receptor_pdbqt().
References pdbqt_initializer::initialize(), pdbqt_initializer::initialize_from_nrp(), pdbqt_initializer::m, non_rigid_parsed::mobility_matrix(), and parse_pdbqt_ligand().
Referenced by parse_bundle().
model parse_ligand_pdbqt | ( | std::stringstream & | ligSS | ) |
References pdbqt_initializer::initialize(), pdbqt_initializer::initialize_from_nrp(), pdbqt_initializer::m, non_rigid_parsed::mobility_matrix(), and parse_pdbqt_ligand().
References pdbqt_initializer::initialize(), pdbqt_initializer::initialize_from_nrp(), pdbqt_initializer::initialize_from_rigid(), pdbqt_initializer::m, non_rigid_parsed::mobility_matrix(), parse_pdbqt_flex(), and parse_pdbqt_rigid().
Referenced by parse_bundle().
References pdbqt_initializer::initialize(), pdbqt_initializer::initialize_from_rigid(), pdbqt_initializer::m, and parse_pdbqt_rigid().