Skip to content

Commit 8a1e3be

Browse files
authored
Add files via upload
1 parent a49a3e6 commit 8a1e3be

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

multioptpy/Wrapper/mapper.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,15 @@ def _bonded_pairs(
844844
if return_indices:
845845
return sym_arr[bonded_ii], sym_arr[bonded_jj], bonded_ii, bonded_jj
846846
return sym_arr[bonded_ii], sym_arr[bonded_jj]
847-
847+
848+
def _covalent_radius(symbol: str) -> float:
849+
"""Return the covalent radius of *symbol* in Angstrom."""
850+
if covalent_radii_lib is not None:
851+
try:
852+
return float(covalent_radii_lib(symbol)) * _BOHR2ANG
853+
except (KeyError, TypeError):
854+
pass
855+
return 0.75 # generic fallback
848856

849857
# ===========================================================================
850858
# Section 3a : ExplorationQueue
@@ -1936,7 +1944,10 @@ def summary(self) -> str:
19361944

19371945
for node in sorted(
19381946
self._nodes.values(),
1939-
key=lambda n: (n.effective_energy is None, n.effective_energy),
1947+
key=lambda n: (
1948+
n.effective_energy is None,
1949+
n.effective_energy if n.effective_energy is not None else 0.0,
1950+
),
19401951
):
19411952
eff = node.effective_energy
19421953
label = "G" if node.free_energy is not None else "E"

0 commit comments

Comments
 (0)