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::AtomTypeSet Class Reference

a set of AtomTypes More...

#include <AtomTypeSet.hh>

Inheritance diagram for core::chemical::AtomTypeSet:
Inheritance graph
[legend]

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 &directory, std::string const &name)
 
 AtomTypeSet (std::string const &name, utility::sql_database::sessionOP db_session)
 
 ~AtomTypeSet () override
 
std::string name () const
 the name of the AtomTypeSet More...
 
TypeSetMode mode () const
 The mode 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...
 
AtomTypeoperator[] (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 read_meta_file (std::string const &filename)
 Read in meta information from the given file Meta information is info about the AtomTypeSet as a whole. 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 &param_name, std::string const &atm_name) const
 Private helper fxn for performing default parameter substitutions while reading a params file. More...
 
AtomTypecreate_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 legacy_command_line_post_processing ()
 post processing from command-line – deprecated, but here for backwards compatibility – rhiju. More...
 
void clone_atom_types_from_commandline ()
 

Private Attributes

TypeSetMode mode_
 The mode (fullatom/centroid/etc) of the AtomTypeSet. More...
 
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...
 
std::string name_
 The name of the ATS. More...
 

Detailed Description

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

Constructor & Destructor Documentation

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(), clone_atom_types_from_commandline(), directory_, legacy_command_line_post_processing(), name_, read_file(), and read_meta_file().

core::chemical::AtomTypeSet::AtomTypeSet ( std::string const &  directory,
std::string const &  name 
)

References name(), and name_.

core::chemical::AtomTypeSet::AtomTypeSet ( std::string const &  name,
utility::sql_database::sessionOP  db_session 
)
core::chemical::AtomTypeSet::~AtomTypeSet ( )
override

References atom_type_index_, and atoms_.

Member Function Documentation

void core::chemical::AtomTypeSet::add_parameters_from_file ( std::string const &  filename)
int core::chemical::AtomTypeSet::atom_type_index ( std::string const &  atom_type_name) const
void core::chemical::AtomTypeSet::clone_atom_types_from_commandline ( )
private
AtomType & core::chemical::AtomTypeSet::create_atom_type_from_database ( std::string const &  atom_type_set_name,
std::string const &  atom_type_name,
utility::sql_database::sessionOP  db_session 
)
private

create an atom type instance on the stack

References atom_type_index_, and atoms_.

Referenced by AtomTypeSet().

std::string const& core::chemical::AtomTypeSet::directory ( ) const
inline

Get the source directory, eg to open an additional file in that directory.

References directory_.

Referenced by core::scoring::AtomVDW::AtomVDW(), and core::scoring::geometric_solvation::DatabaseOccSolEne::DatabaseOccSolEne().

int core::chemical::AtomTypeSet::extra_parameter_index ( std::string const &  name) const
inline
std::map< std::string, int> const& core::chemical::AtomTypeSet::extra_parameter_indices ( ) const
inline
Real core::chemical::AtomTypeSet::get_default_parameter ( std::string const &  param_name,
std::string const &  atm_name 
) const
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.

Note
This function is very SLOW, but that should be OK we only use it a bit right at the start.

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(), and core::chemical::AtomType::lk_volume().

Referenced by add_parameters_from_file().

bool core::chemical::AtomTypeSet::has_atom ( std::string const &  atom_type_name) const
inline
bool core::chemical::AtomTypeSet::has_extra_parameter ( std::string const &  name) const
inline
void core::chemical::AtomTypeSet::legacy_command_line_post_processing ( )
private

post processing from command-line – deprecated, but here for backwards compatibility – rhiju.

Do not add anything here. These options are largely deprecated in favor of options that fine tune score terms (EnergyMethodOptions), which are better controlled than changing AtomTypeSet, which is almost a global setting in Rosetta.

References core::chemical::enlarge_h_lj_wdepth(), and core::chemical::unset_acceptor_ether_oxygens().

Referenced by AtomTypeSet().

TypeSetMode core::chemical::AtomTypeSet::mode ( ) const
inline

The mode of the AtomTypeSet.

References mode_.

Size core::chemical::AtomTypeSet::n_atomtypes ( ) const
inline
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 name_.

Referenced by add_parameters_from_file(), AtomTypeSet(), core::scoring::vdwaals::VDW_Energy::calculate_hydrogen_interaction_cutoff(), protocols::features::AtomAtomPairFeatures::report_atom_pairs(), core::chemical::AtomTypeDatabaseIO::write_atom_type_extra_parameters_table(), and core::chemical::AtomTypeDatabaseIO::write_atom_type_set_to_database().

AtomType const& core::chemical::AtomTypeSet::operator[] ( Size const  index) const
inline

[ ] operator, simulating vector index behavior

look up an AtomTypeSet by 1-based indexing

References atoms_.

AtomType& core::chemical::AtomTypeSet::operator[] ( Size const  index)
inline

[ ] operator, simulating vector index behavior, non-const version

look up an AtomTypeSet by 1-based indexing

References atoms_.

void core::chemical::AtomTypeSet::read_atom_type_extra_parameters_table ( std::string const &  atom_type_set_name,
chemical::AtomType atom_type,
utility::sql_database::sessionOP  db_session 
)
private
void core::chemical::AtomTypeSet::read_atom_type_properties_table ( std::string const &  atom_type_set_name,
chemical::AtomType atom_type,
utility::sql_database::sessionOP  db_session 
)
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_, and core::chemical::tr().

Referenced by core::chemical::add_atom_types_from_command_line(), and AtomTypeSet().

void core::chemical::AtomTypeSet::read_meta_file ( std::string const &  filename)

Read in meta information from the given file Meta information is info about the AtomTypeSet as a whole.

Read in meta information from the given file.

References mode_, and core::chemical::type_set_mode_from_string().

Referenced by AtomTypeSet().

Member Data Documentation

std::map< std::string, int > core::chemical::AtomTypeSet::atom_type_index_
private
utility::vector1< AtomType* > core::chemical::AtomTypeSet::atoms_
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(), clone_atom_types_from_commandline(), create_atom_type_from_database(), get_default_parameter(), n_atomtypes(), operator[](), read_file(), and ~AtomTypeSet().

std::string core::chemical::AtomTypeSet::directory_
private

Save the directory name for future use, eg to load associated AtomVDW data.

Referenced by AtomTypeSet(), and directory().

std::map< std::string, int > core::chemical::AtomTypeSet::extra_parameter_indices_
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().

TypeSetMode core::chemical::AtomTypeSet::mode_
private

The mode (fullatom/centroid/etc) of the AtomTypeSet.

Referenced by mode(), and read_meta_file().

std::string core::chemical::AtomTypeSet::name_
private

The name of the ATS.

Referenced by AtomTypeSet(), and name().


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