calculate¶
-
chemopt.interface.generic.calculate(molecule, hamiltonian, basis, el_calc_input=None, backend=None, charge=0, calculation_type='Single Point', forces=False, title='', multiplicity=1, **kwargs)[source]¶ Calculate the energy of a molecule.
Parameters: - molecule (chemcoord.Cartesian or chemcoord.Zmat or str) – If it is a string, it has to be a valid xyz-file.
- hamiltonian (str) – The hamiltonian to use for calculating the electronic energy. The allowed values are [‘RHF’, ‘MP2’, ‘B3LYP’, ‘CCSD’, ‘CCSD(T)’].
- basis (str) – The basis set to use for calculating the electronic energy. The allowed values are [‘STO-3G’, ‘3-21G’, ‘6-31G’, ‘6-31G(d)’, ‘6-31G(d,p)’, ‘6-31+G(d)’, ‘6-311G(d)’, ‘cc-pVDZ’, ‘cc-pVTZ’, ‘AUG-cc-pVDZ’, ‘AUG-cc-pVTZ’].
- el_calc_input (str) – Specify the input filename for electronic calculations. If it is None, the filename of the calling python script is used (With the suffix
.inpinstead of.py). The output will beos.path.splitext(inputfile)[0] + '.inp'. - backend (str) – Specify which QM program suite shoud be used. Allowed values are {‘molpro’}, the default is ‘molpro’.
- charge (int) – The overall charge of the molecule. The default is 0.
- calculation_type (str) – Currently only ‘Single Point’ allowed.
- forces (bool) – Specify if energy gradients should be calculated. The default is False.
- title (str) – The title to be printed in input and output.
- multiplicity (int) – The spin multiplicity. The default is 1.
Returns: A dictionary with at least the keys
'structure'and'energy'which contains the energy in Hartree. If forces were calculated, the key'gradient'contains the gradient in Hartree / Angstrom.Return type: