Skip to content

Commit

Permalink
Add actinide swap to obmol conformers
Browse files Browse the repository at this point in the history
  • Loading branch information
mgt16-LANL committed Feb 1, 2024
1 parent 1368c90 commit ea343d2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions architector/io_conformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import shutil
import subprocess as sub
import numpy as np
import copy

import architector.io_obabel as io_obabel
import architector.io_molecule as io_molecule
Expand Down Expand Up @@ -104,6 +105,10 @@ def crest_conformers(structure, charge=None, uhf=None,
mol.detect_charge_spin()
mol_charge = mol.xtb_charge

mol.swap_actinide()
actinides = copy.deepcopy(mol.actinides)
actinides_swapped = copy.deepcopy(mol.actinides_swapped)

even_odd_electrons = (np.sum([atom.number for atom in mol.ase_atoms])-mol_charge) % 2
if (uhf is not None):
if (even_odd_electrons == 1) and (uhf == 0):
Expand Down Expand Up @@ -161,8 +166,11 @@ def crest_conformers(structure, charge=None, uhf=None,
conformerList_temp, xtb_energies = read_conformers("crest_conformers.xyz")
conformerList = []
for i,conf in enumerate(conformerList_temp):
mol.actinides = actinides
mol.actinides_swapped = actinides_swapped
tmol = io_molecule.convert_io_molecule(conf)
mol.ase_atoms = tmol.ase_atoms
mol.swap_actinide()
conformerList.append(mol.write_mol2('Crest Conformer {}'.format(i),writestring=True))

return conformerList, xtb_energies
Expand Down

0 comments on commit ea343d2

Please sign in to comment.