QuantumATK > General Questions and Answers

H2 molecule dissociates during optimization

(1/1)

SMA:
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

mlee:
Can you use bulk using periodic boundary condition? This method fits in bulk calculation. In the molecular simulation, the multi-grid possion solver is recommend.

SMA:
Hi
I have tried as per your suggestions but still H2 dissociates. Could you please provide me a  correct input file where H2 does not dissociate.
Thanks in advance

Regards

SMA

Petr Khomyakov:
Please take a look at an example of H2 dissociation energy calculation in the manual https://docs.quantumatk.com/manual/Types/TotalEnergy/TotalEnergy.html. Enclosed you may also find a script that does separation distance optimization in an automated manner, and H2 do not dissociate upon optimization (d_eq~0.76 Ang for the computational settings chosen).

So, these are 2 examples of successful optimization of H2.

Navigation

[0] Message Index

Go to full version