Skip to content

Commit 034743c

Browse files
authored
Merge pull request #324 from duartegroup/v1.4.2
V1.4.2
2 parents 1075b84 + ea815e7 commit 034743c

24 files changed

+2167
-467
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,4 @@ If **autodE** is used in a publication please consider citing the [paper](https:
9494
- Domen Pregeljc ([@dpregeljc](https://github.com/dpregeljc))
9595
- Jonathon Vandezande ([@jevandezande](https://github.com/jevandezande))
9696
- Shoubhik Maiti ([@shoubhikraj](https://github.com/shoubhikraj))
97+
- Daniel Hollas ([@danielhollas](https://github.com/danielhollas))

autode/atoms.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1041,9 +1041,10 @@ def angle(self, i: int, j: int, k: int) -> Angle:
10411041
f"least one zero vector"
10421042
)
10431043

1044-
value = np.arccos(np.dot(vec1, vec2) / norms)
1044+
# Cos(theta) must lie within [-1, 1]
1045+
cos_value = np.clip(np.dot(vec1, vec2) / norms, a_min=-1, a_max=1)
10451046

1046-
return Angle(value)
1047+
return Angle(np.arccos(cos_value))
10471048

10481049
def dihedral(self, w: int, x: int, y: int, z: int) -> Angle:
10491050
r"""

autode/config.py

+3
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ class ORCA:
198198
#
199199
# Path can be unset and will be assigned if it can be found in $PATH
200200
path = None
201+
#
202+
# File extensions to copy when a calculation completes
203+
copied_output_exts = [".out", ".hess", ".xyz", ".inp", ".pc"]
201204

202205
optts_block = (
203206
"\n%geom\n"

autode/mol_graphs.py

+9
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ def node_matcher(self):
115115

116116
return matcher
117117

118+
@property
119+
def is_connected(self) -> bool:
120+
"""Is this graph fully connected (i.e. not separate parts)"""
121+
return nx.is_connected(self)
122+
123+
def connected_components(self):
124+
"""Generate the separate connected components"""
125+
return nx.connected_components(self)
126+
118127

119128
def make_graph(
120129
species: "Species",

autode/neb/original.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Henkelman and H. J ́onsson, J. Chem. Phys. 113, 9978 (2000)
44
"""
55
import numpy as np
6-
import matplotlib.pyplot as plt
76

87
from typing import Optional, Sequence, List, Any, TYPE_CHECKING, Union, Type
98
from copy import deepcopy
@@ -361,6 +360,8 @@ def plot_energies(
361360
self, save=False, name="None", color=None, xlabel="NEB coordinate"
362361
):
363362
"""Plot the NEB surface"""
363+
import matplotlib.pyplot as plt
364+
364365
blues = plt.get_cmap("Blues")
365366

366367
color = (
@@ -673,6 +674,8 @@ def calculate(
673674
etol_per_image: Energy tolerance per image to use in the L-BFGS-B
674675
minimisation
675676
"""
677+
import matplotlib.pyplot as plt
678+
676679
self.print_geometries(name=f"{name_prefix}neb_init")
677680

678681
# Calculate energy on the first and final points as these will not be recalc-ed

autode/opt/coordinates/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
from autode.opt.coordinates.base import OptCoordinates, CartesianComponent
1+
from autode.opt.coordinates.base import OptCoordinates
22
from autode.opt.coordinates.cartesian import CartesianCoordinates
33
from autode.opt.coordinates.dic import DIC, DICWithConstraints

0 commit comments

Comments
 (0)