Author Topic: H2 molecule dissociates during optimization  (Read 4383 times)

0 Members and 1 Guest are viewing this topic.

Offline SMA

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
H2 molecule dissociates during optimization
« on: January 12, 2021, 11:53 »
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

Offline mlee

  • QuantumATK Guru
  • ****
  • Posts: 173
  • Country: dk
  • Reputation: 7
    • View Profile
Re: H2 molecule dissociates during optimization
« Reply #1 on: January 12, 2021, 12:31 »
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.

Offline SMA

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Re: H2 molecule dissociates during optimization
« Reply #2 on: January 13, 2021, 13:49 »
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

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: H2 molecule dissociates during optimization
« Reply #3 on: January 13, 2021, 16:23 »
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.
« Last Edit: January 13, 2021, 16:26 by Petr Khomyakov »