NBO Analysis with ADF and PLAMS

Run NBO analysis on ADF calculations by using the PLAMS ADFNBO recipe.

Downloads: Notebook | Script ?

Requires: AMS2027 or later

Related documentation
../_images/adf_nbo_3_0_49f0139f.png

Initialization

from scm.base import ChemicalSystem
from scm.inputs import ADF, AMS
from scm.plams import Settings, view
from scm.plams.recipes.adfnbo import ADFNBOJob

Define molecule

# Alternatively: mol = ChemicalSystem.from_file("methane.xyz")
mol = ChemicalSystem(
    """
System
    Atoms
         C      0.000000      0.000000      0.000000
         H      0.631600      0.631600      0.631600
         H      0.631600     -0.631600     -0.631600
         H     -0.631600      0.631600     -0.631600
         H     -0.631600     -0.631600      0.631600
    End
End
"""
)

view(mol, guess_bonds=True, width=200, height=200)
image generated from notebook

Create and run job

s = Settings()
s.input = AMS(
    Task="SinglePoint",
    Engine=ADF(Basis={"Type": "DZP"}, XC={"LDA": "SCF VWN"}, Relativity={"Level": "Scalar"}),
)
# Settings holds the NBO post-processing options, outside the AMS input.
s.adfnbo = ["write", "spherical", "fock"]

j = ADFNBOJob(molecule=mol, settings=s)
r = j.run()
[05.11|15:28:55] JOB plamsjob STARTED
[05.11|15:28:55] JOB plamsjob RUNNING
[05.11|15:28:58] JOB plamsjob FINISHED
[05.11|15:28:58] JOB plamsjob SUCCESSFUL

See also

Python Script

#!/usr/bin/env python
# coding: utf-8

# ## Initialization

from scm.base import ChemicalSystem
from scm.inputs import ADF, AMS
from scm.plams import Settings, view
from scm.plams.recipes.adfnbo import ADFNBOJob


# ## Define molecule

# Alternatively: mol = ChemicalSystem.from_file("methane.xyz")
mol = ChemicalSystem(
    """
System
    Atoms
         C      0.000000      0.000000      0.000000
         H      0.631600      0.631600      0.631600
         H      0.631600     -0.631600     -0.631600
         H     -0.631600      0.631600     -0.631600
         H     -0.631600     -0.631600      0.631600
    End
End
"""
)

view(mol, guess_bonds=True, width=200, height=200, picture_path="picture1.png")


# ## Create and run job

s = Settings()
s.input = AMS(
    Task="SinglePoint",
    Engine=ADF(Basis={"Type": "DZP"}, XC={"LDA": "SCF VWN"}, Relativity={"Level": "Scalar"}),
)
# Settings holds the NBO post-processing options, outside the AMS input.
s.adfnbo = ["write", "spherical", "fock"]

j = ADFNBOJob(molecule=mol, settings=s)
r = j.run()


# ## Print results

lines = r.get_output_chunk(
    begin="NATURAL BOND ORBITALS (Summary):", end="Charge unit", inc_begin=True, inc_end=True
)
for line in lines:
    print(line)