#include <atom.hpp>
Inheritance diagram for Atom:
Public Types | |
typedef base_type::dictionary | atom_dictionary |
The type of the atom dictionary. | |
typedef id_type | atom_id_type |
The type of the atom ID for this class (same as the ID type). | |
typedef chemical_type_system::element_dictionary | element_dictionary |
The type of the element dictionary. | |
typedef chemical_type_system::element_id_type | element_id_type |
The type of the element ID for this class. | |
typedef TS | chemical_type_system |
The type of the ChemicalTypeSystem for this class. | |
typedef base_type::dictionary | dictionary |
The type of the dictionary for this class. | |
typedef base_type::id_type | id_type |
The ID type for this class (same as the atom ID type). | |
Public Member Functions | |
Atom () | |
Default constructor. | |
Atom (BTK::MATH::BTKVector const &pos, atom_id_type type, element_id_type etype, int number=0, chemical_type_system const &ts=chemical_type_system()) | |
Construct from data. | |
Atom (self_type const &src) | |
Copy constructor. | |
virtual | ~Atom () |
virtual dictionary const & | get_dictionary () const |
virtual dictionary & | get_dictionary () |
element_id_type | element_type () const |
Get the element type. | |
void | set_element_type (element_id_type et) |
Set the element type. | |
std::string | element_name () const |
Get the element name. | |
int | number () const |
Get the atom number. | |
void | set_number (int number) |
Set the atom number. | |
BTK::MATH::BTKVector const & | position () const |
Get the atom position. | |
void | set_position (BTK::MATH::BTKVector const &position) |
Set the atom position. | |
bool | selected () const |
Is this atom selected? | |
void | select (bool s=true) const |
Set the selection flag for this atom. | |
virtual std::ostream & | print (std::ostream &os, int atom_number=1, int group_number=1, char chain_id= ' ', std::string const &group_name="", bool is_hetatom=false, char alt_loc= ' ', char i_code= ' ', double occupancy=1.0, double b_factor=1.0, std::string const &seg_id="", std::string const &element_name="", std::string const &charge="") const |
Print an atom to a stream, in PDB format. | |
self_type const & | operator= (self_type const &src) |
Assignment operator. | |
bool | operator== (self_type const &rhs) const |
Test atom equality. | |
bool | operator!= (self_type const &rhs) const |
Test atom inequality. |
Element and atom types are enforced at compile time through the use of TypeSystem objects, which specify the atom and element ID types used by Atom, as well as the type dictionaries used to associate ID values to atom and element names. If not specified by the user, every Atom uses the DefaultTypeSystem object, which is a generic TypeSystem that provides dynamic name resolution for atom types.
typedef TS chemical_type_system |
The type of the ChemicalTypeSystem for this class.
Reimplemented from ChemicallyTypedObject< TS, TS::atom_dictionary >.
typedef base_type::dictionary dictionary |
The type of the dictionary for this class.
Reimplemented from ChemicallyTypedObject< TS, TS::atom_dictionary >.
typedef base_type::id_type id_type |
The ID type for this class (same as the atom ID type).
Reimplemented from ChemicallyTypedObject< TS, TS::atom_dictionary >.
typedef base_type::dictionary atom_dictionary |
The type of the atom dictionary.
typedef id_type atom_id_type |
The type of the atom ID for this class (same as the ID type).
typedef chemical_type_system::element_dictionary element_dictionary |
The type of the element dictionary.
typedef chemical_type_system::element_id_type element_id_type |
The type of the element ID for this class.
Atom | ( | ) |
Default constructor.
Atom | ( | BTK::MATH::BTKVector const & | pos, | |
atom_id_type | type, | |||
element_id_type | etype, | |||
int | number = 0 , |
|||
chemical_type_system const & | ts = chemical_type_system() | |||
) |
Construct from data.
pos | The position of the atom. | |
type | The type of the atom. | |
element_type | The element type of the atom. | |
number | The number/index of the atom. | |
ts | An instance of the TypeSystem for this Atom class. |
virtual ~Atom | ( | ) | [virtual] |
virtual dictionary const& get_dictionary | ( | ) | const [virtual] |
Implements ChemicallyTypedObject< TS, TS::atom_dictionary >.
virtual dictionary& get_dictionary | ( | ) | [virtual] |
Implements ChemicallyTypedObject< TS, TS::atom_dictionary >.
element_id_type element_type | ( | ) | const |
Get the element type.
void set_element_type | ( | element_id_type | et | ) |
Set the element type.
std::string element_name | ( | ) | const |
Get the element name.
int number | ( | ) | const |
Get the atom number.
void set_number | ( | int | number | ) |
Set the atom number.
BTK::MATH::BTKVector const& position | ( | ) | const |
Get the atom position.
void set_position | ( | BTK::MATH::BTKVector const & | position | ) |
Set the atom position.
bool selected | ( | ) | const |
Is this atom selected?
void select | ( | bool | s = true |
) | const |
Set the selection flag for this atom.
virtual std::ostream& print | ( | std::ostream & | os, | |
int | atom_number = 1 , |
|||
int | group_number = 1 , |
|||
char | chain_id = ' ' , |
|||
std::string const & | group_name = "" , |
|||
bool | is_hetatom = false , |
|||
char | alt_loc = ' ' , |
|||
char | i_code = ' ' , |
|||
double | occupancy = 1.0 , |
|||
double | b_factor = 1.0 , |
|||
std::string const & | seg_id = "" , |
|||
std::string const & | element_name = "" , |
|||
std::string const & | charge = "" | |||
) | const [virtual] |
Print an atom to a stream, in PDB format.
Test atom equality.
Two atoms are equivalent iff their types and positions are equivalent.