Skip to content

Commit

Permalink
Merge pull request #324 from duartegroup/v1.4.2
Browse files Browse the repository at this point in the history
V1.4.2
  • Loading branch information
t-young31 committed Feb 26, 2024
2 parents 1075b84 + ea815e7 commit 034743c
Show file tree
Hide file tree
Showing 24 changed files with 2,167 additions and 467 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ If **autodE** is used in a publication please consider citing the [paper](https:
- Domen Pregeljc ([@dpregeljc](https://github.com/dpregeljc))
- Jonathon Vandezande ([@jevandezande](https://github.com/jevandezande))
- Shoubhik Maiti ([@shoubhikraj](https://github.com/shoubhikraj))
- Daniel Hollas ([@danielhollas](https://github.com/danielhollas))
5 changes: 3 additions & 2 deletions autode/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,9 +1041,10 @@ def angle(self, i: int, j: int, k: int) -> Angle:
f"least one zero vector"
)

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

return Angle(value)
return Angle(np.arccos(cos_value))

def dihedral(self, w: int, x: int, y: int, z: int) -> Angle:
r"""
Expand Down
3 changes: 3 additions & 0 deletions autode/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ class ORCA:
#
# Path can be unset and will be assigned if it can be found in $PATH
path = None
#
# File extensions to copy when a calculation completes
copied_output_exts = [".out", ".hess", ".xyz", ".inp", ".pc"]

optts_block = (
"\n%geom\n"
Expand Down
9 changes: 9 additions & 0 deletions autode/mol_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,15 @@ def node_matcher(self):

return matcher

@property
def is_connected(self) -> bool:
"""Is this graph fully connected (i.e. not separate parts)"""
return nx.is_connected(self)

def connected_components(self):
"""Generate the separate connected components"""
return nx.connected_components(self)


def make_graph(
species: "Species",
Expand Down
5 changes: 4 additions & 1 deletion autode/neb/original.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Henkelman and H. J ́onsson, J. Chem. Phys. 113, 9978 (2000)
"""
import numpy as np
import matplotlib.pyplot as plt

from typing import Optional, Sequence, List, Any, TYPE_CHECKING, Union, Type
from copy import deepcopy
Expand Down Expand Up @@ -361,6 +360,8 @@ def plot_energies(
self, save=False, name="None", color=None, xlabel="NEB coordinate"
):
"""Plot the NEB surface"""
import matplotlib.pyplot as plt

blues = plt.get_cmap("Blues")

color = (
Expand Down Expand Up @@ -673,6 +674,8 @@ def calculate(
etol_per_image: Energy tolerance per image to use in the L-BFGS-B
minimisation
"""
import matplotlib.pyplot as plt

self.print_geometries(name=f"{name_prefix}neb_init")

# Calculate energy on the first and final points as these will not be recalc-ed
Expand Down
2 changes: 1 addition & 1 deletion autode/opt/coordinates/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from autode.opt.coordinates.base import OptCoordinates, CartesianComponent
from autode.opt.coordinates.base import OptCoordinates
from autode.opt.coordinates.cartesian import CartesianCoordinates
from autode.opt.coordinates.dic import DIC, DICWithConstraints
Loading

0 comments on commit 034743c

Please sign in to comment.