ccu.workflows.vcdd¶
This module defines utilities for charge difference analysis.
Example
import logging
from ase.build import bulk
from ase.calculators import Vasp
from ccu.adsorption.adsorbates import get_adsorbate
from ccu.workflows.vcdd import run_vcdd
logging.basicConfig(level=logging.DEBUG)
atoms = bulk("Au") * 3
atoms.center(vacuum=10, axis=2)
surface_atom = max(atoms, key=lambda a: a.position[2])
co = get_adsorbate("CO")
co.set_tags([-99] * len(co))
com = co.get_center_of_mass()
site = surface_atom.position + [0, 0, 3]
direction = site - com
for atom in co:
atom.position += direction
atoms += co
atoms.calc = Vasp(...)
run_vcdd(atoms, tags=[-99])
- ccu.workflows.vcdd.run_vcdd(atoms: Atoms, tags: list[int]) None[source]¶
Perform a set of calculations for charge density difference analysis.
- Parameters:
atoms – An Atoms object with an attached calculator with which to run the relaxation calculation.
tags – A list of integers, each identifying a subsystem. A calculation will be performed for each tag as well as for all atoms not matching any given tags.
- Raises:
ValueError – No atoms with a specified tag.