morsefit.configuration module¶
Defines the class for an atomic configuration
- class morsefit.configuration.Configuration(file_name, tag, ab_e)[source]¶
Bases: object
Defines an configuration of atoms
All the information about the atomic configurations are tried to be stored and manipulated here.
- molecules¶
The molecules in the configuration, which is a list of lists of coordinates of atoms, given as a pair of element symbol and an numpy array for its Cartesian coordinate.
- file_name¶
The file name for the input file for this configuration.
- tag¶
A tag for the configuration, which can be specified after the ab-initio energy in the input file for the configuration.
- ab_initio_e¶
The ab-initio energy.
- cutoff¶
The distance cut-off for the interactions.
- interactions¶
A list of interacting atomic pairs in the configuration. Given as a triple and atomic symbols and the distance.
- __init__(file_name, tag, ab_e)[source]¶
Initializes the configuration object
It just initializes the basic properties like the file name, the tag, and the ab-initio energy, with the actual molecules have to be added by add_molecule().
Parameters: - file_name – The file name for the input file of the configuration.
- tag – A string for a tag of the configuration.
- ab_e – The ab-initio energy.
- add_molecule(mol)[source]¶
Add a molecule to the configuration
The molecule has to be specified by a list of pairs of element symbols and numpy 1-D array for the Cartesian coordinate.
- calc_interactions(cut_off)[source]¶
Calculate the interactions from the molecules that has been added
Warning
This method has to be invoked after the add_molecule() has been invoked for all the molecules in the system.
Parameters: cut_off – The cut-off for calculating the interactions. It can be set to None to set no cut-off. Returns: The number of interactions that has been recognized.