-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db82215
commit 33050a1
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
""" | ||
Routines for performing ASE NEB from two structures generated at different distances | ||
Developed by Michael Taylor | ||
""" | ||
|
||
from ase.neb import NEB | ||
from architector.io_align_mol import neb_align | ||
from architector.io_calc import CalcExecutor | ||
from architector.io_molecule import convert_io_molecule | ||
|
||
def NEB_setup(initial,final,nimages=8,neb_method='GFN2-xTB',interpolation='idpp',climb=True): | ||
initial_mol = convert_io_molecule(initial) | ||
final_mol = convert_io_molecule(final) | ||
final_mol_ase = neb_align(initial_mol.ase_atoms,final_mol.ase_atoms) | ||
final_mol.ase_atoms = final_mol_ase | ||
images = [initial_mol.ase_atoms] | ||
images += [initial_mol.ase_atoms.copy() for x in range(nimages-2)] | ||
images += [final_mol.ase_atoms] | ||
neb = NEB(images=images,climb=climb) | ||
neb.interpolate(method=interpolation) | ||
neb_images = [] | ||
for image in neb.images: | ||
out = CalcExecutor(image,method=neb_method) | ||
neb_images.append(out.mol.ase_atoms) | ||
neb.images = neb_images | ||
return neb |