The Gnome Chemistry Utils  0.14.0
Public Member Functions | Static Public Member Functions | List of all members
gcu::SpaceGroup Class Reference

Handle crystallographic space group symmetry. More...

#include <openbabel/math/spacegroup.h>

Public Member Functions

 SpaceGroup ()
 ~SpaceGroup ()
void AddTransform (const std::string &s)
std::list< VectorTransform (Vector const &v) const
Transform3d const * GetFirstTransform (std::list< Transform3d * >::const_iterator &i) const
Transform3d const * GetNextTransform (std::list< Transform3d * >::const_iterator &i) const
void RegisterSpaceGroup (int nb=0,...)
bool operator== (const SpaceGroup &group) const
int operator!= (const SpaceGroup &group) const
bool IsValid () const
unsigned GetTransformsNumber () const
void SetHMName (std::string val)
std::string GetHMName (void) const
std::string & GetRefHMName (void)
void SetHallName (std::string val)
std::string GetHallName (void) const
std::string & GetRefHallName (void)
void SetId (unsigned val)
unsigned GetId (void) const
unsigned & GetRefId (void)
unsigned GetCoordinateAlternative (void) const

Static Public Member Functions

static SpaceGroup const * GetSpaceGroup (char const *name)
static SpaceGroup const * GetSpaceGroup (std::string const &name)
static SpaceGroup const * GetSpaceGroup (unsigned id)
static std::list< SpaceGroup
const * > & 
GetSpaceGroups (unsigned id)
static SpaceGroup const * Find (SpaceGroup *group)

Detailed Description

Handle crystallographic space group symmetry.

Since
version 0.12
See Also
transform3d

Definition at line 41 of file spacegroup.h.

Constructor & Destructor Documentation

gcu::SpaceGroup::SpaceGroup ( )

Constructs a new empty, and then invalid, SpaceGroup.

gcu::SpaceGroup::~SpaceGroup ( )

The desrtuctor. Destructs everything.

Member Function Documentation

void gcu::SpaceGroup::AddTransform ( const std::string &  s)
Parameters
sa string representing a transformation.

Adds the transformation described by s to the group. s can follow either the CIF convention (identity is "x,y,z") or the CML convention ("1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0")

static SpaceGroup const* gcu::SpaceGroup::Find ( SpaceGroup group)
static
Parameters
groupa space group.
Returns
a space group from the database identical to group if any.
gcu::SpaceGroup::GetCoordinateAlternative ( void  ) const
inline

Returns the coordinate system code for groups for which it is meaningful or 0 for other groups.

Definition at line 200 of file spacegroup.h.

Transform3d const* gcu::SpaceGroup::GetFirstTransform ( std::list< Transform3d * >::const_iterator &  i) const
Parameters
ian uninitialized iterator.

Initializes the iterator and retrieves the fist Transform3d in the group.

Returns
the first Transform3d.
gcu::SpaceGroup::GetHallName ( void  ) const
inline
Returns
the Hall name for the group.

Definition at line 183 of file spacegroup.h.

gcu::SpaceGroup::GetHMName ( void  ) const
inline
Returns
the Hermann-Mauguin name for the group.

Definition at line 171 of file spacegroup.h.

gcu::SpaceGroup::GetId ( void  ) const
inline
Returns
the crystallographic group identifier.

Definition at line 195 of file spacegroup.h.

Transform3d const* gcu::SpaceGroup::GetNextTransform ( std::list< Transform3d * >::const_iterator &  i) const
Parameters
ian iterator, initialized by GetFirstTransform()
Returns
the next Transform3d.
gcu::SpaceGroup::GetRefHallName ( void  )
inline
Returns
the Hall name for the group as a reference.

Definition at line 183 of file spacegroup.h.

gcu::SpaceGroup::GetRefHMName ( void  )
inline
Returns
the Hermann-Mauguin name for the group as a reference.

Definition at line 171 of file spacegroup.h.

gcu::SpaceGroup::GetRefId ( void  )
inline
Returns
the crystallographic group identifier as a reference.

Definition at line 195 of file spacegroup.h.

static SpaceGroup const* gcu::SpaceGroup::GetSpaceGroup ( char const *  name)
static
Parameters
namea group name.

Retrieves the group corresopnding to name, which can be in Hermann-Mauguin or Hall convention with spaces between the groups such as "P 63/m c m" or "-P 6c 2".

Returns
the found SpaceGroup if any.
static SpaceGroup const* gcu::SpaceGroup::GetSpaceGroup ( std::string const &  name)
static
Parameters
namea group name.

Retrieves the group corresopnding to name, which can be in Hermann-Mauguin or Hall convention with spaces between the groups such as "P 63/m c m" or "-P 6c 2".

Returns
the found SpaceGroup if any.
static SpaceGroup const* gcu::SpaceGroup::GetSpaceGroup ( unsigned  id)
static
Parameters
ida space group conventional identifier (between 1 and 230).
Returns
a SpaceGroup corresponding to the identifier.
static std::list<SpaceGroup const *>& gcu::SpaceGroup::GetSpaceGroups ( unsigned  id)
static
Parameters
ida space group conventional identifier (between 1 and 230).
Returns
a list of all group variants corresponding to the identifier.
unsigned gcu::SpaceGroup::GetTransformsNumber ( ) const
inline
Returns
the number of transformations in the group definition.

Definition at line 155 of file spacegroup.h.

bool gcu::SpaceGroup::IsValid ( ) const
Returns
true if the group definition is valid.
int gcu::SpaceGroup::operator!= ( const SpaceGroup group) const
inline
Parameters
groupa SpaceGroup.

Inequality operator.

Returns
true if the groups are different.

Definition at line 147 of file spacegroup.h.

bool gcu::SpaceGroup::operator== ( const SpaceGroup group) const
Parameters
groupa SpaceGroup.

Equality operator.

Returns
true if the groups are identical, that is have the same list of transformations.
void gcu::SpaceGroup::RegisterSpaceGroup ( int  nb = 0,
  ... 
)
Parameters
nba number of names

Use it if the space group is unknown (might happen if no database has been loaded or if the HM name is not usual). nb is the number of optional alternative names known for the space group. It must be followed by these names.

gcu::SpaceGroup::SetHallName ( std::string  name)
inline
Parameters
namethe Hall name.

Sets the Hall name for the group.

Definition at line 183 of file spacegroup.h.

gcu::SpaceGroup::SetHMName ( std::string  name)
inline
Parameters
namethe Hermann-Maugin name.

Sets the Hermann-Mauguin name for the group.

Definition at line 171 of file spacegroup.h.

gcu::SpaceGroup::SetId ( unsigned  id)
inline
Parameters
ida crystallographic group identifier.

Sets the crystallographic group identifier.

Definition at line 195 of file spacegroup.h.

std::list<Vector> gcu::SpaceGroup::Transform ( Vector const &  v) const
Parameters
va Vector.

Evaluates the list of the effect of each transform in the group on v and eliminates duplicates.

Returns
the list of the images of v.

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