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]
bounding_box

The bounding box of the morphology.

A pair of ccdc.molecule.Coordinates representing the minimum and maximum corners of the box.

centre_of_geometry

The centroid of the morphology.

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:
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.

scale_factor

The factor by which the morphology is scaled.

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.

area

The area of the polygon.

attachment_energy

Attachment energy of the facet in kJ/mol

centre_of_geometry

The centre of geometry of the facet.

coordinates

The coordinates of the vertices of the facet.

d_spacing

d-spacing of the facet

edges

The edges making up the facet.

miller_indices

The Miller indices of the facet.

percentage_area

Percentage of the total surface area accounted for by this facet

perpendicular_distance

The perpendicular distance from the origin.

plane

The plane of the facet.

This is a ccdc.descriptors.GeometricDescriptors.Plane instance.

surface_energy

Surface energy of the facet in mJ/m^2

bounding_box

The bounding box of the morphology.

A pair of ccdc.molecule.Coordinates representing the minimum and maximum corners of the box.

centre_of_geometry

The centroid of the morphology.

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:
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.

scale_factor

The factor by which the morphology is scaled.

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.

electrostatic

The electrostatic energy.

h_bond

The total hydrogen bond energy.

h_bond_attraction

The attractive hydrogen bond energy.

h_bond_repulsion

The repulsive hydrogen bond energy.

total

The total energy.

vdw

The total Van der Waals energy.

vdw_attraction

The attractive Van der Waals energy.

vdw_repulsion

The repulsive Van der Waals energy.

lattice_energy

The energies associated with the lattice.

Returns:A ccdc.descriptors.CrystalDescriptors.VisualHabit.Results.LatticeEnergy instance
morphology

The calculated morphology

Returns:A ccdc.morphology.VisualHabitMorphology instance
class Settings[source]

Settings for the VisualHabit runner.

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.

electrostatic_correction

The electrostatic correction mode.

Set to None to turn this off. Default to Evjen.

potential

The potential forcefield used for the calculation.

Set this to one of dreidingII (default), gavezzotti, or momany.

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.