seamm_ase package#
Submodules#
seamm_ase.seamm_ase module#
- class seamm_ase.seamm_ase.ASE_mixin[source]#
Bases:
objectA mix-in class for connnecting with ASE methods and calculators.
- ase_atoms(configuration)[source]#
Return an ASE Atoms object for the configuration.
- Parameters:
configuration (molsystem._Configuration) – The configuration
- Returns:
atoms – The ASE Atoms object.
- Return type:
ase.Atoms()
- ase_calculator(calculator, properties=['energy'], system_changes=['positions', 'numbers', 'cell', 'pbc', 'initial_charges', 'initial_magmoms'])[source]#
Create a calculator for the structure step.
- Parameters:
ase (ase.calculators.calculator.Calculator) – The ASE calculator we are working for
properties (list of str) – The properties to calculate.
system_changes (int) – The changes to the system.
- Returns:
results – The dictionary of results from the calculation.
- Return type:
dict
- ase_read_bibliography()[source]#
Read the bibliography from a file and add to the local bibliography
- class seamm_ase.seamm_ase.SEAMM_Calculator(step, calculator=None, name=None, configuration=None, **kwargs)[source]#
Bases:
CalculatorGeneric ASE calculator for SEAMM.
This is a generic calculator that can be used from any step in SEAMM to use functionality in ASE.
The step must have a calculator method that is called by this class:
def calculator( self, calculator, properties=["energy"], system_changes=ASE_all_changes, ): """Create a calculator for the structure step. Parameters ---------- ase : ase.calculators.calculator.Calculator The ASE calculator we are working for properties : list of str The properties to calculate. system_changes : int The changes to the system. """ ...
An example can be found in the Structure step.
The step must also create the SEAMM_Calculator, passing itself into the constructor, and set up the Atoms object to use this calculator:
... symbols = configuration.atoms.symbols XYZ = configuration.atoms.coordinates calculator = SEAMM_Calculator(self) atoms = ASE_Atoms("".join(symbols), positions=XYZ, calculator=calculator) ...
The step can then call the calculate method of the SEAMM_Calculator to perform the calculation, or can pass the calculator to other ASE drivers that will use the calculator.
- calculate(atoms=None, properties=['energy', 'forces'], system_changes=['positions', 'numbers', 'cell', 'pbc', 'initial_charges', 'initial_magmoms'])[source]#
Perform the calculation.
- Parameters:
atoms (ase.Atoms) – The atoms object to calculate.
properties (list of str) – The properties to calculate.
system_changes (int) – The changes to the system.
- Returns:
The results of the calculation.
- Return type:
dict
- property configuration#
The configuration this calculator represents.
- implemented_properties: List[str] = ['energy', 'forces']#
Properties calculator can handle (energy, forces, …)
- property name#
A name for this calculator.
- nolabel = True#
Module contents#
Connector between SEAMM and ASE