![]() |
Rosetta Core
2014.35
|
a set of AtomTypes More...
#include <AtomTypeSet.hh>
Public Member Functions | |
AtomTypeSet (std::string const &directory) | |
c-tor from directory in the rosetta_database This will go through the directory, usually "$ROSETTA3_DB/chemical/atom_type_sets/<atom_type_set_name>" and initialize all the atom types defined in atom_properties.txt and the extra parameters specified in extras.txt More... | |
AtomTypeSet (std::string const &name, utility::sql_database::sessionOP db_session) | |
virtual | ~AtomTypeSet () |
std::string | name () const |
the name of the AtomTypeSet More... | |
Size | n_atomtypes () const |
number of atom types in the set More... | |
std::string const & | directory () const |
Get the source directory, eg to open an additional file in that directory. More... | |
bool | has_atom (std::string const &atom_type_name) const |
Check if atom is present. More... | |
int | atom_type_index (std::string const &atom_type_name) const |
lookup the atom_type by the atom_type_name string More... | |
AtomType const & | operator[] (Size const index) const |
[ ] operator, simulating vector index behavior More... | |
AtomType & | operator[] (Size const index) |
[ ] operator, simulating vector index behavior, non-const version More... | |
int | extra_parameter_index (std::string const &name) const |
SLOW. More... | |
std::map< std::string, int > const & | extra_parameter_indices () const |
bool | has_extra_parameter (std::string const &name) const |
void | read_file (std::string const &filename) |
file I/O More... | |
void | add_parameters_from_file (std::string const &filename) |
additional file I/O More... | |
Private Member Functions | |
Real | get_default_parameter (std::string const ¶m_name, std::string const &atm_name) const |
Private helper fxn for performing default parameter substitutions while reading a params file. More... | |
AtomType & | create_atom_type_from_database (std::string const &atom_type_set_name, std::string const &atom_type_name, utility::sql_database::sessionOP db_session) |
create an atom type instance on the stack More... | |
void | read_atom_type_properties_table (std::string const &atom_type_set_name, chemical::AtomType &atom_type, utility::sql_database::sessionOP db_session) |
void | read_atom_type_extra_parameters_table (std::string const &atom_type_set_name, chemical::AtomType &atom_type, utility::sql_database::sessionOP db_session) |
void | enlarge_h_lj_wdepth () |
Private Attributes | |
std::map< std::string, int > | atom_type_index_ |
lookup map: get atom_type_index by atom_type_name More... | |
utility::vector1< AtomType * > | atoms_ |
a collection of AtomTypes, More... | |
std::map< std::string, int > | extra_parameter_indices_ |
lookup map: get atom extra parameter index by atom_type_name More... | |
std::string | directory_ |
Save the directory name for future use, eg to load associated AtomVDW data. More... | |
a set of AtomTypes
a vector of pointers each of which points to an AtomType and the vector index is looked up by an atom_name string in a map
core::chemical::AtomTypeSet::AtomTypeSet | ( | std::string const & | directory | ) |
c-tor from directory in the rosetta_database This will go through the directory, usually "$ROSETTA3_DB/chemical/atom_type_sets/<atom_type_set_name>" and initialize all the atom types defined in atom_properties.txt and the extra parameters specified in extras.txt
References add_parameters_from_file(), utility::io::izstream::close(), directory(), directory_, basic::options::OptionKeys::chemical::enlarge_H_lj, enlarge_h_lj_wdepth(), getline(), utility::io::izstream::good(), basic::options::option, and read_file().
core::chemical::AtomTypeSet::AtomTypeSet | ( | std::string const & | name, |
utility::sql_database::sessionOP | db_session | ||
) |
References create_atom_type_from_database(), directory_, extra_parameter_index(), extra_parameter_indices_, basic::database::full_name(), read_atom_type_extra_parameters_table(), read_atom_type_properties_table(), basic::database::safely_prepare_statement(), and basic::database::safely_read_from_database().
|
virtual |
References atom_type_index_, and atoms_.
void core::chemical::AtomTypeSet::add_parameters_from_file | ( | std::string const & | filename | ) |
additional file I/O
References atom_type_index_, atoms_, extra_parameter_indices_, get_default_parameter(), getline(), l, name(), parameters, params, runtime_assert, basic::T(), tag, tags, core::chemical::tr, utility_exit, and utility_exit_with_message.
Referenced by core::chemical::add_atom_type_set_parameters_from_command_line(), and AtomTypeSet().
int core::chemical::AtomTypeSet::atom_type_index | ( | std::string const & | atom_type_name | ) | const |
lookup the atom_type by the atom_type_name string
References atom_type_index_, utility::trim(), and utility_exit_with_message.
Referenced by core::scoring::AtomVDW::AtomVDW(), enlarge_h_lj_wdepth(), get_default_parameter(), core::chemical::modify_atom_properties_from_command_line(), and core::scoring::geometric_solvation::DatabaseOccSolEne::read_datafile().
|
private |
create an atom type instance on the stack
References atom_type_index_, atoms_, core::chemical::AtomType::name(), basic::database::safely_prepare_statement(), basic::database::safely_read_from_database(), core::chemical::AtomType::set_parameter(), and utility_exit_with_message.
Referenced by AtomTypeSet().
|
inline |
Get the source directory, eg to open an additional file in that directory.
References directory_.
Referenced by AtomTypeSet(), core::scoring::AtomVDW::AtomVDW(), and core::scoring::geometric_solvation::DatabaseOccSolEne::DatabaseOccSolEne().
|
private |
References atom_type_index(), and atoms_.
Referenced by AtomTypeSet().
|
inline |
SLOW.
References extra_parameter_indices_, and utility_exit_with_message.
Referenced by AtomTypeSet(), core::scoring::calc_per_atom_sasa(), core::scoring::sasa::LeGrandSasa::calculate(), get_default_parameter(), core::pack::interaction_graph::RotamerDotsRadiusData::get_NACCESS_SASA_radii(), core::pack::interaction_graph::RotamerDotsRadiusData::get_ROSETTA_SASA_radii(), core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::init_SASA_radii_from_database(), core::scoring::GenBornResidueInfo::initialize(), and core::scoring::FACTSRsdTypeInfo::initialize_parameters().
|
inline |
References extra_parameter_indices_.
Referenced by core::chemical::AtomTypeDatabaseIO::write_atom_type_extra_parameters_table().
|
private |
Private helper fxn for performing default parameter substitutions while reading a params file.
Private helper function for filling in default values in the fxn add_parameters_from_file Enables the user to specify a default parameter set to be used and then provide a few modifications.
eg in the dna_interface lj-radii parameter set we shrink the hydrogens but leave the rest unchanged.
References atom_type_index(), atoms_, core::chemical::AtomType::extra_parameter(), extra_parameter_index(), has_extra_parameter(), core::chemical::AtomType::lj_radius(), core::chemical::AtomType::lj_wdepth(), core::chemical::AtomType::lk_dgfree(), core::chemical::AtomType::lk_lambda(), core::chemical::AtomType::lk_volume(), and utility_exit_with_message.
Referenced by add_parameters_from_file().
|
inline |
Check if atom is present.
References atom_type_index_.
Referenced by core::chemical::modify_atom_properties_from_command_line(), and core::chemical::sdf::MolFileIOMolecule::set_from_extra_data().
|
inline |
References extra_parameter_indices_.
Referenced by get_default_parameter().
|
inline |
number of atom types in the set
References atoms_.
Referenced by core::scoring::AtomVDW::AtomVDW(), core::scoring::calc_per_atom_sasa(), core::scoring::sasa::LeGrandSasa::calculate(), core::scoring::vdwaals::VDW_Energy::calculate_hydrogen_interaction_cutoff(), core::pack::interaction_graph::RotamerDotsRadiusData::get_NACCESS_SASA_radii(), core::pack::interaction_graph::RotamerDotsRadiusData::get_ROSETTA_SASA_radii(), core::pack::interaction_graph::HPatchInteractionGraph< V, E, G >::init_SASA_radii_from_database(), core::scoring::geometric_solvation::DatabaseOccSolEne::read_datafile(), core::scoring::AtomVDW::setup_approximate_vdw_radii(), and core::chemical::AtomTypeDatabaseIO::write_atom_type_set_to_database().
std::string core::chemical::AtomTypeSet::name | ( | ) | const |
the name of the AtomTypeSet
The directory is like '$ROSETTA3_DB/rosetta_database/chemical/atom_type_sets/<atom_type_set_name>/' Return 'atom_type_set_name' Note: strip off the trailing slash, if it exists
References directory_.
Referenced by add_parameters_from_file(), core::scoring::vdwaals::VDW_Energy::calculate_hydrogen_interaction_cutoff(), core::chemical::AtomTypeDatabaseIO::write_atom_type_extra_parameters_table(), and core::chemical::AtomTypeDatabaseIO::write_atom_type_set_to_database().
[ ] operator, simulating vector index behavior
look up an AtomTypeSet by 1-based indexing
References atoms_.
[ ] operator, simulating vector index behavior, non-const version
look up an AtomTypeSet by 1-based indexing
References atoms_.
|
private |
|
private |
void core::chemical::AtomTypeSet::read_file | ( | std::string const & | filename | ) |
file I/O
initialize an AtomTypeSet from an external file "filename", and set parameters and properties for each AtomType. Refer to minirosetta_database_stock/chemical/atom_type_sets/fa_standard/atom_properties.txt for file format
References atom_type_index_, atoms_, getline(), l, core::chemical::AtomType::set_parameter(), core::chemical::AtomType::set_property(), tag, tags, core::chemical::tr, and utility_exit_with_message.
Referenced by AtomTypeSet().
|
private |
lookup map: get atom_type_index by atom_type_name
Referenced by add_parameters_from_file(), atom_type_index(), create_atom_type_from_database(), has_atom(), read_file(), and ~AtomTypeSet().
|
private |
a collection of AtomTypes,
AtomType has data of atom properties, and it can be looked up by atom_type_index.
Referenced by add_parameters_from_file(), create_atom_type_from_database(), enlarge_h_lj_wdepth(), get_default_parameter(), n_atomtypes(), operator[](), read_file(), and ~AtomTypeSet().
|
private |
Save the directory name for future use, eg to load associated AtomVDW data.
Referenced by AtomTypeSet(), directory(), and name().
|
private |
lookup map: get atom extra parameter index by atom_type_name
Referenced by add_parameters_from_file(), AtomTypeSet(), extra_parameter_index(), extra_parameter_indices(), and has_extra_parameter().