This module is the outcome of a student summer project and provides ways to identify symmetry groups of molecules.
Molecule
describes a molecule
IdentifyPointGroup
identifies a point group
Bases: replab.Str
Gives information about a molecule
References
Beruski, O., Vidal, L. N. (2013). Algorithms for computer detection of symmetry elements in molecular systems. Journal of Computational Chemistry, Volume 35, Issue 4. https://doi-org/10.1002/jcc.23493
Vallance, C. (2020). Symmetry Classification of Molecules: Point Groups. Chemistry LibreTexts. https://chem.libretexts.org
Class members list
Properties
coords
– the coordinates of atoms in the molecule (coords are sorted by increasing values)
id
– identification of molecular point group through an axis on coordinates
masses
– masses of atoms corresponding to coordinates
name
– name of replab.Molecule
object
natoms
– total number of atoms
symbols
– symbols of atoms corresponding to coordinates
Prettyprinting
additionalFields
– Returns the name/value pairs corresponding to additional fields to be printed
disp
– Standard MATLAB/Octave display method
headerStr
– Tiny single line description of the current object type
hiddenFields
– Returns the names of the fields that are not printed as a row vector
longStr
– Multi-line description of the current object
shortStr
– Single line text description of the current object
General
ImproperRotationAction
– Finds action of a rotation by 2pi/k then a reflection on the molecule
Molecule
– Creates a molecule object
ReflectionAction
– Finds action of a reflection by 2pi/k on the molecule
RotationAction
– Finds action of a rotation by 2pi/k on the molecule
fromAtoms
– Creates a molecule object atomic information
fromFile
– Creates a molecule object from a file
getMasses
– Get the atomic masses for the atom represented by each symbol
readXYZ
– Reads the coordinates and atomic symbols from an xyz file
Inherited elements
Documentation in replab.Str.additionalFields()
Documentation in replab.Str.disp()
Documentation in replab.Str.headerStr()
Documentation in replab.Str.hiddenFields()
Documentation in replab.Str.longStr()
Documentation in replab.Str.shortStr()
the coordinates of atoms in the molecule (coords are sorted by increasing values)
double(3, natoms)
identification of molecular point group through an axis on coordinates
masses of atoms corresponding to coordinates
double(1, natoms)
name of replab.Molecule
object
charstring
total number of atoms
integer
symbols of atoms corresponding to coordinates
cell(1, natoms) of charstring
Finds action of a rotation by 2pi/k then a reflection on the molecule
k (integer
) – rotation by angle 2*pi/k
axis (double(1, 3)
) – rotation axis and normal of reflection plane
ndec (integer) (optional
) – the number of decimals to round for equality
Creates a molecule object
Convention: automatically sort coordinates in ascending order rounding to 2 decimal places for equality
coords (double(3, natoms)
) – a set of coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols of coordinates
ndec (integer
) – number of decimal places to round when checking for equality
Finds action of a reflection by 2pi/k on the molecule
normal (double(1, 3)
) – normal of reflection plane
ndec (integer) (optional
) – the number of decimals to round for equality
Finds action of a rotation by 2pi/k on the molecule
k (integer
) – rotation by angle 2*pi/k
axis (double(1, 3)
) – axis about which we rotate molecule
ndec (integer) (optional
) – the number of decimals to round for equality
Creates a molecule object atomic information
coords (double(3, natoms)
) – atomic coordinates (can be unsorted)
symbols (cell(1, natoms) of charstring
) – atomic symbols
atomicSymbols (optional cell(1, *) of charstring
) – atomic symbols of masses to
replace or add to stored masses
atomicMasses (optional cell(1, *) of double
) – atomic masses corresponding to atomicSymbols
molecule object
mol (replab.Molecule
)
Creates a molecule object from a file
filename (charstring
) – name of file with molecular information
atomicSymbols (optional cell(1, *) of charstring
) – atomic symbols of masses to
replace or add to stored masses
atomicMasses (optional cell(1, *) of double
) – atomic masses corresponding to atomicSymbols
molecule object
mol (replab.Molecule
)
Get the atomic masses for the atom represented by each symbol
symbols (cell(1, natoms) of charstring
) – symbols of atoms
atomicSymbols (optional cell(1, *) of charstring
) – atomic symbols of masses to
replace or add to stored masses
atomicMasses (optional cell(1, *) of double
) – atomic masses corresponding to atomicSymbols
masses (cell(1, natoms) of double): masses of atoms
Reads the coordinates and atomic symbols from an xyz file
filename (charstring
) – name and location of xyz file
coords (double(3, natoms)): coordinates from xyz file symbols (cell(1, natoms) of charstring): symbols of atoms from xyz file
Bases: replab.Str
Gives information about a molecule
References
Beruski, O., Vidal, L. N. (2013). Algorithms for computer detection of symmetry elements in molecular systems. Journal of Computational Chemistry, Volume 35, Issue 4. https://doi-org/10.1002/jcc.23493
Vallance, C. (2020). Symmetry Classification of Molecules: Point Groups. Chemistry LibreTexts. https://chem.libretexts.org
Class members list
Properties
ndec
– number of decimal places to check for equality
ord
– highest order rotation of the molecule that preserves symmetry
pointGroup
– characters representing the point group
principalAxis
– principal axis of rotation of the molecule
table
– the character table for the molecule’s point group
Prettyprinting
additionalFields
– Returns the name/value pairs corresponding to additional fields to be printed
disp
– Standard MATLAB/Octave display method
headerStr
– Tiny single line description of the current object type
hiddenFields
– Returns the names of the fields that are not printed as a row vector
longStr
– Multi-line description of the current object
shortStr
– Single line text description of the current object
General
IdentifyPointGroup
– Creates a molecule object
ImproperRotation
– Apply rotation of 2*pi/k and then reflection through rotation plane
InertiaTensor
– calculates the inertia tensor for a group of atoms
Reflection
– Reflect coords through a plane with a given normal
Rotation
– Apply rotation of 2*pi/k to coords about an axis
checkPlanar
– Determines if molecule is planar
coordsEqual
– Checks whether a new set of coordinates is equivalent to original ones
determineLowSymmetry
– Determines point group on molecules without Cn axis
determineSphericalGroup
– Determine spherical group of the molecule
distanceMatrix
– Determine the distance matrix of the molecules
findC2Axes
– Determines whether molecule has a C2 axis and returns first one found
findCharacterTable
– Determines the character table of a molecule with a certain point group
findCnAxes
– Find whether there are multiple higher order rotation axes
findDihedralMirrorPlanes
– Determines number of dihedral mirror planes in the molecule
findPerpendicularAxes
– Finds all C2 axes perpendicular to the principal axis
findPointGroup
– Determine the point group of molecule by symmetry operation flowchart
findReflections
– Finds reflection planes in the molecule
findRotations
– Determine the rotation order and axis for a group of atoms
groupAtoms
– Finds atoms of same type with same distances
sortCoords
– Sorts coordinates in ascending order
Inherited elements
Documentation in replab.Str.additionalFields()
Documentation in replab.Str.disp()
Documentation in replab.Str.headerStr()
Documentation in replab.Str.hiddenFields()
Documentation in replab.Str.longStr()
Documentation in replab.Str.shortStr()
number of decimal places to check for equality
integer
highest order rotation of the molecule that preserves symmetry
integer
characters representing the point group
charstring
principal axis of rotation of the molecule
double(3, 1)
the character table for the molecule’s point group
Creates a molecule object
coords (double(3, natoms)
) – a set of coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols of coordinates
masses (cell(1, natoms) of charstring
) – atomic masses of coordinates
ndec (integer
) – number of decimal places to round when checking for equality
Apply rotation of 2*pi/k and then reflection through rotation plane
k (integer
) – number of rotations then reflection which should keep coordinates the same
axis (double(1, 3)
) – axis about which to rotate coordinates and normal for reflection plane
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols of coords
ndec (integer
) – number of decimals to round
whether reflection keeps coordinates the same inds (integer(1, natoms)): action of improper rotation on coordinates
ok (logical)
calculates the inertia tensor for a group of atoms
coords (double(3, *)
) – coordinates of atoms
masses (double(1, *)
) – masses of atoms
inertia tensor of given coordinates rcm (double(1, 3)): center of mass vector
I (double(3, 3))
Reflect coords through a plane with a given normal
normal (double(1, 3)
) – normal of plane through which to reflect
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols of coords
ndec (integer
) – number of decimals to round
whether reflection keeps coordinates the same inds (integer(1, natoms)): action of reflection on coordinates
ok (logical)
Apply rotation of 2*pi/k to coords about an axis
k (integer
) – number of rotations which should keep coordinates the same
axis (double(1, 3)
) – axis about which to rotate coordinates
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols of coords
ndec (integer
) – number of decimals to round
whether reflection keeps coordinates the same inds (integer(1, natoms)): action of rotation on coordinates
ok (logical)
Determines if molecule is planar
coords (double(3, natoms)
) – atomic coordinates
whether molecule is planar normal (double(3, 1)): normal of plane formed by first three atoms
planar (logical)
Checks whether a new set of coordinates is equivalent to original ones
Convention: assumes self.coords is already sorted
old_coords (double(3, natoms)
) – reference coordinates
new_coords (double(3, natoms)
) – new set of coordinates to check for equality
symbols (cell(1, natoms) of charstring
) – molecular symbols of coordinates
ndec (integer
) – number of decimal places to round for equality testing
whether new coordinates are equal to self.coords inds (integer(1, natoms)): vector that will sort old_coords to new_coords
ok (logical)
Determines point group on molecules without Cn axis
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
SEAs (cell(1, *) of double(*, 1)
) – cell array of vectors of the indices of similar atoms
Determine spherical group of the molecule
Determines whether molecule has tetrahedral, octahedral, or icosahedral symmetry and assigns point group
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
SEAs (cell(1, *) of double(*, 1)
) – cell array of vectors of the indices of similar atoms
Check number of C5 axes greater than 2
Determine the distance matrix of the molecules
atoms 1, 2, …, natoms so D(i, i) = 0
coords (double(3, natoms)
) – molecular coordinates
distance matrix
D (double(natoms, natoms))
Determines whether molecule has a C2 axis and returns first one found
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
SEAs (cell(1, *) of double(*, 1)
) – cell array of vectors of the indices of similar atoms
rcm (double(1, 3)
) – centre of mass vector
whether molecule contains C2 axis axis (double(1, 3)): axis of C2 rotation
ok (logical)
Determines the character table of a molecule with a certain point group
pointGroup (charstring
) – name of point group (i.e. C3v or D4d)
character table of point group
Find whether there are multiple higher order rotation axes
n (integer
) – order of rotation
max_rotations (integer
) – check whether there are at least this many rotation axes of order n
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
SEAs (cell(1,*) of double(*,1)
) – cell array of vectors of the indices of similar atoms
ok (logical): whether there are at least max_rotations rotation axes of order n
Determines number of dihedral mirror planes in the molecule
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
perpAxes (double(3, *)
) – axes of rotation perpendicular to principal axis
number of dihedral mirror planes
nsigmad (integer)
Finds all C2 axes perpendicular to the principal axis
axes (double(3, *)
) – any already known axes
ords (integer(1, *)
) – orders of known axes of rotation
rcm (double(1, 3)
) – centre of mass vector
SEAs (cell(1, *) of double(*, 1)
) – cell array of vectors of the indices of similar atoms
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
number of perpendicular axes perpAxes (double(3, *)): axes of rotation perpendicular to principal axis
ind (integer)
Determine the point group of molecule by symmetry operation flowchart
Algorithm from Beruski and flowchart from Vallance
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
masses (double(1, natoms)
) – atomic masses
SEAs (cell(1, *) of double(*, 1)
) – cell array of vectors of the indices of similar atoms
Finds reflection planes in the molecule
coords (double(3, natoms)
) – atomic coordinates
symbols (cell(1, natoms) of charstring
) – atomic symbols
SEAs (cell(1, *) of double(*, 1)
) – cell array of vectors of the indices of similar atoms
whether there is a horizontal reflection plane nv (integer): number of vertical reflection planes
horizontal (logical)
Determine the rotation order and axis for a group of atoms
From Beruski
coords (double(3, natoms)
) – coordinates of atoms
symbols (cell(1, natoms) of charstring
) – atomic symbols of coordinates
masses (cell(1, natoms) of charstring
) – atomic masses of coordinates
inds (integer(1, *)
) – indices of group of atoms whose rotations we find
highest order rotation possible axis (double(1, 3)): axis of rotation
order (integer)
Finds atoms of same type with same distances
D (double(natoms, natoms)
) – distance matrix
ndec (integer
) – number of decimal places to test equality
SEAs (cell(1, *) of integer(1, *)): array of lists of same atoms with same distances
Sorts coordinates in ascending order
y-coordinate, and then z-coordinate
coords (double(3, natoms)
) – set of coordinates
ndec (integer
) – number of decimals to check equality
sorted coordinates i1 (integer(1, natoms)): indices that revert coords to original order
coords (double(3, natoms))