26 #ifndef ATOMPROPERTIES_H
27 #define ATOMPROPERTIES_H
81 virtual void xmlPrint(std::ostream&);
95 void setPosition(
const double,
const double,
const double);
This class manages all the properties attached to an atom.
Definition: AtomProperties.h:45
static void resetUniqueIndex()
Reinitialize the unique index to zero (usually that what you want to do when you start to load a new ...
Definition: AtomProperties.cpp:36
double * X
Pointer to the memory triplet that stores the atom's position.
Definition: AtomProperties.h:118
static unsigned int maxUniqueIndex
unique number (used to generate unique index for atoms if not given at the instantiation)
Definition: AtomProperties.h:109
AtomProperties(PhysicalModel *myPM)
Default constructor : set the position to the origin, and generate an unique index.
Definition: AtomProperties.cpp:44
bool allocated
true only if the memory used for the position was allocated in the constructor and not changed afterw...
Definition: AtomProperties.h:121
void setPositionPointer(double *ptr, bool update=true)
change the position pointer.
Definition: AtomProperties.cpp:106
void getPosition(double pos[3]) const
get the position of the atom (array of 3 doubles)
Definition: AtomProperties.h:125
~AtomProperties() override
the destructor...
Definition: AtomProperties.cpp:93
void setPosition(const double[3])
set the position of the atom
Definition: AtomProperties.h:131
void allocate()
allocate the memory needed for the position (double[3]).
Definition: AtomProperties.cpp:100
virtual void xmlPrint(std::ostream &)
print to an output stream in "pseudo" XML format.
Definition: AtomProperties.cpp:129
An atom has an unique index in the physical model object, a 3D position, and different basic properti...
Definition: Atom.h:49
This is the main class of this project.
Definition: PhysicalModel.h:86
PhysicalModel * myPM
pointer to the physical model the object is in
Definition: Properties.h:136
Describes the properties common to all structures.
Definition: StructureProperties.h:38