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

property edges

The edges making up the facet.

property miller_indices

The Miller indices of the facet.

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

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

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 to Evjen.

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