EFT-LDFA calculator
Local density friction approximation (LDFA) allows evaluation of electronic friction tensors (EFTs) by utilizing surface density at the position of adsorbate atom. For details, please go to: NQCDynamics-LDFA.
To obtain EFT with LDFA, we need to evaluate surface electronic density. This can be done using many methods. Here, we will focus on ACEpotentials.jl models.
Below are the instructions on how to initialize the ACE-LDFA calculator, to run molecular dynamics with electronic friction (MDEF) within NQCDynamics.jl using FrictionProviders.jl.
The following instructions will include Julia-based code.
We start with importing NQCDynamics.jl packages and PyCall which allows importing Python-based packages.
using FrictionProviders
using PyCall: pyimport
using NQCBase: NQCBase
using Unitful: @u_str
using ACE1
using ASE
using JuLIP
using NQCModels
# Importing Python modules with PyCall
io = pyimport("ase.io")
Now, we specify the density units, EFT indices, and paths to the model. We read the ASE atoms object and we convert it to JuLIP Atoms object.
density_unit = u"Å^-3"
eft_ids = [length(atoms_ase)-1,length(atoms_ase)] # remember that Cu(211) in my db is 3x4 (other facets are 3x3), so 'atoms_ase' may not always have 56 atoms
model_p = "path/to/ace/model/h2cu_ace.json"
atoms_p = "path/to/atoms.xyz"
atoms_ase = io.read(atoms_p)
atoms, R, cell = NQCBase.convert_from_ase_atoms(atoms_ase)
atoms_ase.pop() # for density models we need a structure with a single H atom for model initialization - make sure 'atoms' still includes 2 atoms
atoms_ase_jl = ASE.ASEAtoms(atoms_ase) # convert to ASE.jl object
atoms_julip = JuLIP.Atoms(atoms_ase_jl) # convert to julip object
We then set up our JuLIP-ACE calculator within NQCDynamics.jl and we create AceLDFA and LDFAFriction objects with FrictionProviders.jl.
IP = ACE1.read_dict(load_dict(model_p)["IP"])
JuLIP.set_calculator!(atoms_julip, IP)
ace_model = AdiabaticModels.JuLIPModel(atoms_julip)
density_model = AceLDFA(ace_model; density_unit=density_unit)
model = LDFAFriction(density_model, atoms; friction_atoms=eft_ids)
Together with PES model, the above LDFA object (LDFAFriction) can be then used for MDEF simulations (as documented in NQCDynamics-MDEF).