Atom
-
struct Atom : public Element
Container to represent atom properties
Usage example:
Usage example:# create an empty atom object - all attributes are left uninitialised Atom atom; # set atom symbol atom.symbol="Ti" # set atom name, atomic number... see Element class for attributes # set atom position to (1.1, 2.2, 3.3) atom.position(0) = 1.1; atom.position(1) = 2.2; atom.position(2) = 3.3; # set force atom.force(0)= 0.1; atom.force(1)= -0.2; atom.force(2)= 0.3;
Usage example:# Use constructor to fully initialise this object # with the position and force as in the example above Element element = PeriodicTable().find_by_symbol("Ti"); Atom atom(element, 1.1, 2.2, 3.3, 0.1, -0.2, 0.3);
# Print atom object using streams: std::cout << atom; # Print position only std::cout << atom.position
See also
Public Functions
-
Atom()
Create an empty atom object. All class attributes are left uninitialised.
-
Atom(const Element &element, const double px, const double py, const double pz, const double fx, const double fy, const double fz)
This constructor fully initialise this object
- Parameters:
element – [in] Chemical Element
px, py, pz – [in] Atomic coordinates
fx, fy, fz – [in] Force acting on the atom
-
Atom()