Skip to content

Commit

Permalink
Merge branch 'master' of github.com:zadorlab/sella
Browse files Browse the repository at this point in the history
  • Loading branch information
juditzador committed Oct 15, 2024
2 parents b01df68 + 0bba1b7 commit 4d5412b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
13 changes: 8 additions & 5 deletions sella/internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ def _find_mic(self, indices: Tuple[int, ...]) -> np.ndarray:
])

for dx, ncvec in zip(dxs, ncvecs):
vlen = np.infty
vlen = np.inf
for neighbor in self._get_neighbors(dx):
trial = np.linalg.norm(dx + neighbor @ self.atoms.cell)
if trial < vlen:
Expand Down Expand Up @@ -1393,10 +1393,13 @@ def find_all_bonds(
self.add_bond((i, j), ts)
except DuplicateInternalError:
continue
c10y[i, nbonds[i]] = j
nbonds[i] += 1
c10y[j, nbonds[j]] = i
nbonds[j] += 1
if nbonds[i] < max_bonds and nbonds[j] < max_bonds:
c10y[i, nbonds[i]] = j
nbonds[i] += 1
c10y[j, nbonds[j]] = i
nbonds[j] += 1
else:
pass
first_run = False
scale *= 1.05

Expand Down
2 changes: 0 additions & 2 deletions sella/optimize/irc.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def __init__(
logfile: str = '-',
trajectory: Optional[Union[str, TrajectoryWriter]] = None,
master: Optional[bool] = None,
force_consistent: bool = False,
ninner_iter: int = 10,
irctol: float = 1e-2,
dx: float = 0.1,
Expand All @@ -41,7 +40,6 @@ def __init__(
logfile=logfile,
trajectory=trajectory,
master=master,
force_consistent=force_consistent,
)
self.ninner_iter = ninner_iter
self.irctol = irctol
Expand Down
6 changes: 2 additions & 4 deletions sella/optimize/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def __init__(
logfile: str = '-',
trajectory: Union[str, Trajectory] = None,
master: bool = None,
force_consistent: bool = False,
delta0: float = None,
sigma_inc: float = None,
sigma_dec: float = None,
Expand Down Expand Up @@ -98,8 +97,7 @@ def __init__(
self.rs = get_restricted_step(rs)
Optimizer.__init__(self, atoms, restart=restart,
logfile=logfile, trajectory=asetraj,
master=master,
force_consistent=force_consistent)
master=master)

if delta0 is None:
delta0 = default['delta0']
Expand Down Expand Up @@ -154,7 +152,7 @@ def __init__(
self.xi = 1.
self.nsteps_per_diag = nsteps_per_diag
self.nsteps_since_diag = 0
self.diag_every_n = np.infty if diag_every_n is None else diag_every_n
self.diag_every_n = np.inf if diag_every_n is None else diag_every_n

def initialize_pes(
self,
Expand Down
2 changes: 1 addition & 1 deletion sella/optimize/stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def get_s(self, alpha: float) -> Tuple[np.ndarray, np.ndarray]:
class QuasiNewton(BaseStepper):
alpha0 = 0.
alphamin = 0.
alphamax = np.infty
alphamax = np.inf
slope = -1
synonyms = [
'qn',
Expand Down
1 change: 1 addition & 0 deletions sella/py.typed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit 4d5412b

Please sign in to comment.