Name

MoleculeConfiguration Used to create a single isolated molecule.

Synopsis

Namespace: ATK.KohnSham
Object MoleculeConfiguration(
elements,
cartesian_coordinates,
pseudopotential_parameters
)

Description

The MoleculeConfiguration class is used to represent a single molecule containing a fixed number of atoms. The positions of the atoms are specified using Cartesian coordinates.

List of arguments

elements

A list of the elements of each atom in the molecule.

Default: None

cartesian_coordinates

A list containing tuples of Cartesian coordinates, in a desired unit, for each atom in the molecule. The list should have the same length as the list of elements, and the atoms should be ordered in the same way.

Default: None

pseudopotential_parameters

Dictionary of pseudopotential parameters.

Default: None

Returned object methods

A MoleculeConfiguration has the following query functions:

  • Array cartesianCoordinates(): Returns a NumPy array of the Cartesian coordinates of the atoms.

  • List elements(): Returns the elements of the atoms.

Usage examples

Define the geometry of and construct a water molecule:

from ATK.KohnSham import *

elements = [Oxygen] + 2*[Hydrogen]
coordinates = [
    ( 0.000, 0.000, 0.0)*Ang,
    ( 0.757, 0.586, 0.0)*Ang,
    (-0.757, 0.586, 0.0)*Ang
    ]
water_molecule = MoleculeConfiguration(
    elements,
    coordinates
    )

Print a formatted list of the atoms in a molecule as well as their coordinates in units of Ångstrom:

def printMoleculeConfiguration(molecule):
    all_coords = molecule.cartesianCoordinates()
    elements = molecule.elements()
    for (elem,pos) in zip(elements,all_coords):
        print elem.symbol(),
        for x in pos:
            print "\t",x.inUnitsOf(Angstrom),
        print

Notes

A molecule is considered to be isolated in space, but for the purpose of solving the Poisson equation as efficiently as possible (using an FFT method) ATK places the molecule in a periodically repeated unit cell. For more information, see poissonEquationParameters().

To perform a DFT calculation of a MoleculeConfiguration, pass it as an argument to executeSelfConsistentCalculation().