FOX/ObjCryst++  2022
ObjCryst::MolAtom Class Reference

MolAtom : atom inside a Molecule. More...

+ Collaboration diagram for ObjCryst::MolAtom:

Public Member Functions

 MolAtom (const REAL x, const REAL y, const REAL z, const ScatteringPower *pPow, const string &name, Molecule &parent)
 Constructor for a MolAtom.
 
virtual ~MolAtom ()
 Destructor. More...
 
void SetName (const string &name)
 
const string & GetName () const
 
string & GetName ()
 
const MoleculeGetMolecule () const
 
MoleculeGetMolecule ()
 
const REAL & X () const
 
const REAL & Y () const
 
const REAL & Z () const
 
REAL & X ()
 
REAL & Y ()
 
REAL & Z ()
 
REAL GetX () const
 
REAL GetY () const
 
REAL GetZ () const
 
REAL GetOccupancy () const
 
void SetX (const REAL) const
 Set the X,Y,Z coordinate - this is const because sometimes their coordinate must be changed even though the atom does not move, if the atom is part of a rigid group (its position is then described by a combination of atomic cooordinates, plus a global translation and rotation...
 
void SetY (const REAL) const
 
void SetZ (const REAL) const
 
void SetOccupancy (const REAL)
 
bool IsDummy () const
 Returns true if this is a dummy atom, i.e. More...
 
const ScatteringPowerGetScatteringPower () const
 
void SetScatteringPower (const ScatteringPower &)
 
virtual void XMLOutput (ostream &os, int indent=0) const
 
virtual void XMLInput (istream &is, const XMLCrystTag &tag)
 
void SetIsInRing (const bool r) const
 Flag this atom as being in a ring (or not). More...
 
bool IsInRing () const
 
void SetNonFlipAtom (const bool nonflip)
 Set a flag to prevent the atom's absolute configuration to be changed. More...
 
bool IsNonFlipAtom () const
 Can this atom be flipped (return=false) or should its absolute configuration be kept (return=true)
 
size_t int_ptr () const
 Access to the integer address of this object, for unique identification from python.
 

Private Attributes

string mName
 Name for this atom.
 
REAL mX
 Cartesian oordinates in the Molecule reference frame. More...
 
REAL mY
 
REAL mZ
 
REAL mOccupancy
 Occupancy.
 
const ScatteringPowermpScattPow
 ScatteringPower.
 
MoleculempMol
 Parent Molecule.
 
bool mIsInRing
 Is the atom in a ring ?
 
bool mIsNonFlipAtom
 Can the atom be flipped (this is used for optically active atom which should keep their absolute configuration.
 

Detailed Description

MolAtom : atom inside a Molecule.

This keeps coordinates, recorded in a cartesian frame (in Angstroem), the associated scattering power and it also keeps in a list of all bonds in which this atom is involved.

Note
maybe it's not a great idea to keep a reference of bonds for this atom in here

Definition at line 58 of file Molecule.h.

Constructor & Destructor Documentation

◆ ~MolAtom()

ObjCryst::MolAtom::~MolAtom ( )
virtual

Destructor.

Tells the parent Molecule and all Bond that it is being destroyed.

Definition at line 201 of file Molecule.cpp.

Member Function Documentation

◆ IsDummy()

bool ObjCryst::MolAtom::IsDummy ( ) const

Returns true if this is a dummy atom, i.e.

without an associated scattering power.

Dummy atoms can be used to mark positions, or for restraints.

Definition at line 252 of file Molecule.cpp.

◆ SetIsInRing()

void ObjCryst::MolAtom::SetIsInRing ( const bool  r) const

Flag this atom as being in a ring (or not).

This is a const method because the existence of a ring is only a consequence of the connectivity of the Molecule.

Definition at line 344 of file Molecule.cpp.

◆ SetNonFlipAtom()

void ObjCryst::MolAtom::SetNonFlipAtom ( const bool  nonflip)

Set a flag to prevent the atom's absolute configuration to be changed.

Parameters
nonflipif true, the atom.

This should only be changed by Molecule::AddNonFlipAtom() and Molecule::RemoveNonFlipAtom()

Definition at line 347 of file Molecule.cpp.

Member Data Documentation

◆ mX

REAL ObjCryst::MolAtom::mX
mutableprivate

Cartesian oordinates in the Molecule reference frame.

mutable because they may need to be changed when in a rigid group, even though the end position of the atom remains the same.

Definition at line 133 of file Molecule.h.


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