Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Nov 21, 2024
1 parent 5da107c commit 3cae32d
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions pynta/coveragedependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2218,30 +2218,22 @@ def mol_to_atoms(admol,slab,sites,metal,partial_atoms=None,partial_admol=None):
Returns:
_type_: Atoms object corresponding to the admol 2D configuration
"""
assert admol.atoms[1].site == "bridge"
assert partial_admol.atoms[1].site == "bridge"
if partial_atoms and partial_admol:
atoms = deepcopy(partial_atoms)
gpartial_admol = partial_admol.to_group()
admol_atom_order = admol.atoms[:]
gpartial_admol_order = gpartial_admol.atoms[:]
assert admol.atoms[1].site == "bridge"
assert partial_admol.atoms[1].site == "bridge"
try:
subisos = admol.find_subgraph_isomorphisms(gpartial_admol,save_order=True)
except ValueError:
subisos = admol.find_subgraph_isomorphisms(gpartial_admol)
admol.atoms = admol_atom_order
gpartial_admol.atoms = gpartial_admol_order
assert admol.atoms[1].site == "bridge"
assert partial_admol.atoms[1].site == "bridge"
if len(subisos) == 0:
raise ValueError("partial_admol is not subgraph isomorphic to admol: {0}, {1}".format(gpartial_admol.to_adjacency_list(),admol.to_adjacency_list()))
subiso = subisos[0]
atoms_in_partial = [a for a in subiso.keys() if not a.is_surface_site()]
split_structs,adsorbed_atom_dict = split_adsorbed_structures(admol,clear_site_info=False,adsorption_info=True,atoms_to_skip=atoms_in_partial)
assert admol.atoms[1].site == "bridge"
assert partial_admol.atoms[1].site == "bridge"
elif partial_atoms is None and partial_admol is None:
atoms = deepcopy(slab)
split_structs,adsorbed_atom_dict = split_adsorbed_structures(admol,clear_site_info=False,adsorption_info=True)
Expand Down

0 comments on commit 3cae32d

Please sign in to comment.