Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Structure optimization

From notebook cell

import veloxchem as vlx

molecule = vlx.Molecule.read_smiles('CCO')
basis = vlx.MolecularBasis.read(molecule, 'def2-svp')

scf_drv = vlx.ScfRestrictedDriver()
scf_drv.xcfun = 'b3lyp'
results = scf_drv.compute(molecule, basis)

opt_drv = vlx.OptimizationDriver(scf_drv)
opt_results = opt_drv.compute(molecule, basis, results)
opt_drv.plot_convergence(opt_results)
<Figure size 650x400 with 1 Axes>

From an h5 file

opt_results = vlx.read_results("../output_files/bithio-S0-opt.h5", label="opt")
opt_drv.plot_convergence(opt_results)
<Figure size 650x400 with 1 Axes>