Skip to content

Commit

Permalink
changed default to mayer
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Papior <[email protected]>
  • Loading branch information
zerothi committed Jan 21, 2024
1 parent 3b33190 commit 9bad0c3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/sisl/physics/densitymatrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ def _convert(M):
f"{self.__class__.__name__}.mulliken only allows projection [orbital, atom]"
)

def bond_order(self, method: str = "wiberg"):
def bond_order(self, method: str = "mayer"):
r"""Bond-order calculation using various methods
For ``method='wiberg'``, the bond-order is calculated as:
Expand Down Expand Up @@ -453,14 +453,18 @@ def bond_order(self, method: str = "wiberg"):
Parameters
----------
method : {wiberg, mayer, bond+anti}[:spin]
method : {mayer, wiberg, bond+anti}[:spin]
which method to calculate the bond-order with
"""
method = method.lower()

what = "sum"
# split method to retrieve options
m, *opts = method.split(":")

# only extract the summed density
what = "sum"
if "spin" in opts:
# do this for each spin x, y, z
what = "spin"
del opts[opts.index("spin")]

Expand Down

0 comments on commit 9bad0c3

Please sign in to comment.