Skip to content

Commit 3f2ba37

Browse files
authored
Update utils.py
Updated get_connectivity, to be consistent with bonds shown in ase gui
1 parent 5b09eeb commit 3f2ba37

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

autoadsorbate/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@ def __init__(self):
2323
self.message = 'Molecule is in gas phase'
2424
super().__init__(self.message)
2525

26-
def get_connectivity(atoms: ase.Atoms, mult:float = 1.0) -> np.ndarray:
26+
def get_connectivity(atoms: ase.Atoms, mult:float = 1.335) -> np.ndarray:
2727
"""Get the connectivity matrix of an ASE Atoms object.
2828
Parameters:
2929
atoms (ase.Atoms): The ASE Atoms object.
3030
mult (float): Multiplier for the natural cutoffs.
31+
Defaults to 1.335, to be consistent
32+
with bond thresholds in ase gui.
3133
Returns:
3234
np.ndarray: The connectivity matrix.
3335
"""
34-
cutoffs = natural_cutoffs(atoms, mult=mult)
36+
cutoffs = natural_cutoffs(atoms, skin=0, mult=mult)
3537
nl = NeighborList(cutoffs, self_interaction=False, bothways=True)
3638
nl.update(atoms)
3739

0 commit comments

Comments
 (0)