Hi experts
Happy New Year to all of you
I was optimizing of H2 molecule using LCAO calculator and DZP basis set. The molecule after optimization gets dissociated leading to a bond distance of 2.95Angstorm.
The total energy is: -26.96448eV (Is it correct value??). Could you please help me to find out where is the error.
The input.py is given below.
# -*- coding: utf-8 -*-
# -------------------------------------------------------------
# Molecule Configuration
# -------------------------------------------------------------
# Define elements
elements = [Hydrogen, Hydrogen]
# Define coordinates
cartesian_coordinates = [[-0.12113621627 , 0.257571870579, 0.225387244323],
[ 0.518863737818, 0.257571870579, 0.225387244323]]*Angstrom
# Set up configuration
molecule_configuration = MoleculeConfiguration(
elements=elements,
cartesian_coordinates=cartesian_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
#----------------------------------------
# Basis Set
#----------------------------------------
basis_set = [
GGABasis.Hydrogen_DoubleZetaPolarized,
]
#----------------------------------------
# Exchange-Correlation
#----------------------------------------
exchange_correlation = SGGA.PBE
numerical_accuracy_parameters = NumericalAccuracyParameters(
density_mesh_cutoff=30.0*Hartree,
)
calculator = LCAOCalculator(
basis_set=basis_set,
exchange_correlation=exchange_correlation,
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
molecule_configuration.setCalculator(calculator)
nlprint(molecule_configuration)
molecule_configuration.update()
nlsave('H2-opt.hdf5', molecule_configuration)
# -------------------------------------------------------------
# Optimize Geometry
# -------------------------------------------------------------
molecule_configuration = OptimizeGeometry(
molecule_configuration,
max_forces=0.05*eV/Ang,
max_steps=200,
max_step_length=0.2*Ang,
trajectory_filename='H2-opt',
disable_stress=True,
optimizer_method=LBFGS(),
)
nlsave('H2-opt.hdf5', molecule_configuration)
nlprint(molecule_configuration)
# -------------------------------------------------------------
# Total Energy
# -------------------------------------------------------------
total_energy = TotalEnergy(molecule_configuration)
nlsave('H2-opt.hdf5', total_energy)
nlprint(total_energy)
Regards
SMA