Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::chemical::sdf::MolFileIOMolecule Class Reference

#include <MolFileIOData.hh>

Inheritance diagram for core::chemical::sdf::MolFileIOMolecule:
Inheritance graph
[legend]

Public Member Functions

 MolFileIOMolecule ()
 
 ~MolFileIOMolecule () override
 
std::string name () const
 
void name (std::string name)
 
MolFileIOAtomOP atom_index (AtomIndex index)
 Retrieve a modifiable atom by index. More...
 
void add_atom (MolFileIOAtomOP atom)
 Add an atom (takes possession of object) More...
 
void add_bond (MolFileIOBondOP bond)
 Add a bond (takes possession of object) More...
 
void add_str_str_data (std::string const &key, std::string const &value)
 
StrStrMap const & get_str_str_data () const
 
void normalize ()
 Generate data for potentially missing fields. More...
 
MutableResidueTypeOP convert_to_ResidueType (chemical::AtomTypeSetCOP atom_types, chemical::ElementSetCOP elements, chemical::MMAtomTypeSetCOP mm_atom_types)
 Make a ResidueType from this object. More...
 
MutableResidueTypeOP convert_to_ResidueType (std::map< AtomIndex, std::string > &index_name_map, chemical::AtomTypeSetCOP atom_types, chemical::ElementSetCOP elements, chemical::MMAtomTypeSetCOP mm_atom_types)
 Make a ResidueType from this object Index_name_map will contain a mapping from this object's AtomIndexes to the atom names in the returned ResidueType. More...
 

Private Member Functions

void set_from_extra_data (MutableResidueType &restype, std::map< mioAD, core::chemical::VD > &restype_from_mio)
 From the str/str data in MolFile, additional information Specifically, it's the overall atom and bond information. More...
 
bool index_valid (AtomIndex index, MutableResidueType const &restype, std::map< mioAD, core::chemical::VD > &restype_from_mio)
 
void parse_multi (std::istream &estream, utility::vector1< std::string > &parsed, std::string label) const
 Parse a multiple value item, say for per-atom or per-bond data This assumes that the passed vector is pre-initialized to the appropriate size. Valid formats are a series of space-separated sequential items, or a space-separated set of items in the form of "(index,value)". Spaces are not valid in either entry. More...
 
void create_dummy_atom (MutableResidueTypeOP restype, std::string atom_name, core::Vector const &xyz_offset, chemical::ElementSetCOP elements, chemical::MMAtomTypeSetCOP mm_atom_types)
 

Private Attributes

std::string name_
 
MolFileIOGraph molgraph_
 
std::map< AtomIndex, mioADindex_atom_map_
 
StrStrMap molecule_string_data_
 

Constructor & Destructor Documentation

core::chemical::sdf::MolFileIOMolecule::MolFileIOMolecule ( )
core::chemical::sdf::MolFileIOMolecule::~MolFileIOMolecule ( )
overridedefault

Member Function Documentation

void core::chemical::sdf::MolFileIOMolecule::add_atom ( MolFileIOAtomOP  atom)

Add an atom (takes possession of object)

References index_atom_map_, and molgraph_.

Referenced by core::chemical::sdf::CtabV2000Parser::parse(), and core::chemical::sdf::CtabV3000Parser::parse().

void core::chemical::sdf::MolFileIOMolecule::add_bond ( MolFileIOBondOP  bond)

Add a bond (takes possession of object)

References index_atom_map_, and molgraph_.

Referenced by core::chemical::sdf::CtabV2000Parser::parse(), and core::chemical::sdf::CtabV3000Parser::parse().

void core::chemical::sdf::MolFileIOMolecule::add_str_str_data ( std::string const &  key,
std::string const &  value 
)
MolFileIOAtomOP core::chemical::sdf::MolFileIOMolecule::atom_index ( AtomIndex  index)

Retrieve a modifiable atom by index.

References core::chemical::sdf::has(), index_atom_map_, and molgraph_.

Referenced by core::chemical::sdf::CtabV2000Parser::parse_property_line().

MutableResidueTypeOP core::chemical::sdf::MolFileIOMolecule::convert_to_ResidueType ( chemical::AtomTypeSetCOP  atom_types,
chemical::ElementSetCOP  elements,
chemical::MMAtomTypeSetCOP  mm_atom_types 
)
inline

Make a ResidueType from this object.

Not const as it calls normalize() to fix up missing data first.

MutableResidueTypeOP core::chemical::sdf::MolFileIOMolecule::convert_to_ResidueType ( std::map< AtomIndex, std::string > &  index_name_map,
chemical::AtomTypeSetCOP  atom_types,
chemical::ElementSetCOP  elements,
chemical::MMAtomTypeSetCOP  mm_atom_types 
)
void core::chemical::sdf::MolFileIOMolecule::create_dummy_atom ( MutableResidueTypeOP  restype,
std::string  atom_name,
core::Vector const &  xyz_offset,
chemical::ElementSetCOP  elements,
chemical::MMAtomTypeSetCOP  mm_atom_types 
)
private
StrStrMap const& core::chemical::sdf::MolFileIOMolecule::get_str_str_data ( ) const
inline

References molecule_string_data_.

bool core::chemical::sdf::MolFileIOMolecule::index_valid ( AtomIndex  index,
MutableResidueType const &  restype,
std::map< mioAD, core::chemical::VD > &  restype_from_mio 
)
private
std::string core::chemical::sdf::MolFileIOMolecule::name ( ) const
inline

References name_.

Referenced by set_from_extra_data().

void core::chemical::sdf::MolFileIOMolecule::name ( std::string  name)
inline

References name(), and name_.

Referenced by name().

void core::chemical::sdf::MolFileIOMolecule::normalize ( )

Generate data for potentially missing fields.

Referenced by convert_to_ResidueType().

void core::chemical::sdf::MolFileIOMolecule::parse_multi ( std::istream &  estream,
utility::vector1< std::string > &  parsed,
std::string  label 
) const
private

Parse a multiple value item, say for per-atom or per-bond data This assumes that the passed vector is pre-initialized to the appropriate size. Valid formats are a series of space-separated sequential items, or a space-separated set of items in the form of "(index,value)". Spaces are not valid in either entry.

References core::chemical::sdf::TR().

Referenced by set_from_extra_data().

void core::chemical::sdf::MolFileIOMolecule::set_from_extra_data ( MutableResidueType restype,
std::map< mioAD, core::chemical::VD > &  restype_from_mio 
)
private

Member Data Documentation

std::map< AtomIndex, mioAD > core::chemical::sdf::MolFileIOMolecule::index_atom_map_
private
StrStrMap core::chemical::sdf::MolFileIOMolecule::molecule_string_data_
private
MolFileIOGraph core::chemical::sdf::MolFileIOMolecule::molgraph_
private
std::string core::chemical::sdf::MolFileIOMolecule::name_
private

Referenced by convert_to_ResidueType(), and name().


The documentation for this class was generated from the following files: