Morphology API¶
Introduction¶
The ccdc.morphology
module contains classes for crystal morphology.
The main classes in the ccdc.morphology
module are:
API¶
- class ccdc.morphology.BFDHMorphology(crystal=None)[source]¶
- property bounding_box¶
The bounding box of the morphology.
A pair of
ccdc.molecule.Coordinates
representing the minimum and maximum corners of the box.
- property centre_of_geometry¶
The centroid of the morphology.
- property facets¶
The facets making up the morphology.
- static from_file(file_name)¶
Creates a Morphology instance from a CIF file.
The CIF file should be those written by this class or Mercury, which includes a scaling for each of the perpendicular distances.
- static from_growth_rates(crystal, growth_rates)¶
Creates a morphology from an iterable of growth rates.
- Parameters:
crystal – an instance of
ccdc.crystal.Crystal
.growth_rates – an iterable of pairs,
ccdc.crystal.Crystal.MillerIndices
and perpendicular distance, otherwise known as morphological importance.
- property oriented_bounding_box¶
The minimum volume box of the morphology.
This will not necessarily be aligned to the orthonormal cartesian axes.
- relative_area(miller_indices)¶
The relative area of the facet.
This is what is usually called the Morphological Importance of a facet.
- property scale_factor¶
The factor by which the morphology is scaled.
- property volume¶
The volume of the morphology.
This is calculated stochastically, rather than analytically, so has some error.
- write(file_name, keep_all_indices=False)¶
Write this morphology to CIF file.
- class ccdc.morphology.VisualHabitMorphology(_results, crystal)[source]¶
The morphological information of the VisualHabit calculation
- class VisualHabitFacet(_facet, _perpendicular_distance, _miller_indices, _face_property)[source]¶
One of the facets of a VisualHabit morphology.
- property area¶
The area of the polygon.
- property attachment_energy¶
Attachment energy of the facet in kJ/mol
- property centre_of_geometry¶
The centre of geometry of the facet.
- property coordinates¶
The coordinates of the vertices of the facet.
- property d_spacing¶
d-spacing of the facet in Angstroms.
- property edges¶
The edges making up the facet.
- property miller_indices¶
The Miller indices of the facet.
- property offset¶
The offset at which the energies are measured, in Angstroms.
- property percentage_area¶
Percentage of the total surface area accounted for by this facet
- property perpendicular_distance¶
The perpendicular distance from the origin.
- property plane¶
The plane of the facet.
This is a
ccdc.descriptors.GeometricDescriptors.Plane
instance.
- property surface_energy¶
Surface energy of the facet in mJ/m^2
- property bounding_box¶
The bounding box of the morphology.
A pair of
ccdc.molecule.Coordinates
representing the minimum and maximum corners of the box.
- property centre_of_geometry¶
The centroid of the morphology.
- property facets¶
The facets making up the morphology
- Returns:
A tuple of
ccdc.morphology.VisualHabitMorphology.VisualHabitFacet
instances
- static from_file(file_name)¶
Creates a Morphology instance from a CIF file.
The CIF file should be those written by this class or Mercury, which includes a scaling for each of the perpendicular distances.
- static from_growth_rates(crystal, growth_rates)¶
Creates a morphology from an iterable of growth rates.
- Parameters:
crystal – an instance of
ccdc.crystal.Crystal
.growth_rates – an iterable of pairs,
ccdc.crystal.Crystal.MillerIndices
and perpendicular distance, otherwise known as morphological importance.
- property oriented_bounding_box¶
The minimum volume box of the morphology.
This will not necessarily be aligned to the orthonormal cartesian axes.
- relative_area(miller_indices)¶
The relative area of the facet.
This is what is usually called the Morphological Importance of a facet.
- property scale_factor¶
The factor by which the morphology is scaled.
- property volume¶
The volume of the morphology.
This is calculated stochastically, rather than analytically, so has some error.
- write(file_name, keep_all_indices=False)¶
Write this morphology to CIF file.
- class ccdc.morphology.VisualHabit(settings=None)[source]¶
Descriptors for VisualHabit.
- class Results(crystal, _results)[source]¶
Holds the results of a VisualHabit calculation.
All energy terms are given in kJ/mol.
- class LatticeEnergy(_energies)[source]¶
The lattice energy associated with a facet of the lattice.
- property electrostatic¶
The electrostatic energy.
- property h_bond¶
The total hydrogen bond energy.
- property h_bond_attraction¶
The attractive hydrogen bond energy.
- property h_bond_repulsion¶
The repulsive hydrogen bond energy.
- property total¶
The total energy.
- property vdw¶
The total Van der Waals energy.
- property vdw_attraction¶
The attractive Van der Waals energy.
- property vdw_repulsion¶
The repulsive Van der Waals energy.
- class Synthon(_synthon, _results)[source]¶
A synthon or molecular interaction within the crystal lattice.
- property distance: float¶
The distance between the two molecules’s centroids in Angstroms.
- property electrostatic: float¶
The electrostatic energy in kJ/mol.
- property h_bond: float¶
The hydrogen bond energy in kJ/mol.
- property symmetry_operator: str¶
Return a string representing the symmetry operator relating the two molecules.
- property total: float¶
The total energy in kJ/mol.
- property translation_vector¶
Return the unit cell translation vector between the two molecules.
- property vdw: float¶
The Van der Waals energy in kJ/mol.
- facet_energy(miller_indices)[source]¶
Return the facet for the miller indices with energy information, but no morphology geometry information.
- Parameters:
miller_indices – a
ccdc.crystal.Crystal.MillerIndices
instance, or a tuple of (h,k,l).- Returns:
A
ccdc.morphology.VisualHabitMorphology.VisualHabitFacet
instance.
- property lattice_energy¶
The energies associated with the lattice.
- Returns:
A
ccdc.descriptors.CrystalDescriptors.VisualHabit.Results.LatticeEnergy
instance
- property morphology¶
The calculated morphology
- Returns:
A
ccdc.morphology.VisualHabitMorphology
instance
- property synthons¶
The synthons, or molecular interactions within the crystal.
- Returns:
A tuple of
ccdc.descriptors.CrystalDescriptors.VisualHabit.Results.Synthon
instances.
- class Settings[source]¶
Settings for the VisualHabit runner.
- property convergence_limiting_radius¶
The convergence limiting radius for the calculation.
The default is 30.0 Angstroms.
Setting it higher will significantly increase the time of calculation.
- property electrostatic_correction¶
The electrostatic correction mode.
Set to
None
to turn this off. Default toEvjen
.
- property potential¶
The potential forcefield used for the calculation.
Set this to one of
dreidingII
(default),gavezzotti
, ormomany
.
- calculate(crystal)[source]¶
Calculate the habit of the crystal.
- Parameters:
crystal – a
ccdc.crystal.Crystal
instance.- Returns:
a
ccdc.descriptors.CrystalDescriptors.VisualHabit.Results
instance.
The calculation will not be possible if the crystal contains significant disorder or if some heavy atoms of the crystal have no coordinates.