Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: SCM-NV/PLAMS
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2024.103
Choose a base ref
...
head repository: SCM-NV/PLAMS
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fix2024
Choose a head ref
  • 7 commits
  • 8 files changed
  • 3 contributors

Commits on Oct 10, 2024

  1. Copy the full SHA
    3919d45 View commit details
  2. Update version to 2024.104 SCMSUITE-9732 SO--

    dormrod committed Oct 10, 2024
    Copy the full SHA
    adb374e View commit details

Commits on Oct 21, 2024

  1. Update version.py

    We released 104, so the version needs to be updated to 205.
    bas-rustenburg authored Oct 21, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    08f62cf View commit details

Commits on Oct 22, 2024

  1. Add manual trigger to AMSJobLogTailHandler SCMSUITE-10077 SO107

    dormrod committed Oct 22, 2024
    Copy the full SHA
    7fb4b40 View commit details

Commits on Nov 19, 2024

  1. Copy the full SHA
    e48be41 View commit details
  2. Fix to ams calculator for ase>=3.23 SCMSUITE-10090 SO107

    dormrod committed Nov 19, 2024
    Copy the full SHA
    94546dd View commit details

Commits on Nov 20, 2024

  1. Update version to 2024.106 SO-- SAT--

    bas-rustenburg committed Nov 20, 2024

    Unverified

    This user has not yet uploaded their public signing key.
    Copy the full SHA
    503162c View commit details
Showing with 27 additions and 12 deletions.
  1. +2 −2 .github/workflows/ci.yml
  2. +3 −3 .github/workflows/publish.yml
  3. +10 −1 interfaces/adfsuite/ams.py
  4. +6 −2 interfaces/adfsuite/ase_calculator.py
  5. +1 −1 mol/identify.py
  6. +1 −1 mol/molecule.py
  7. +3 −1 requirements.txt
  8. +1 −1 version.py
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -83,7 +83,7 @@ jobs:
uses: actions/checkout@v4

- name: Set Up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"

@@ -117,7 +117,7 @@ jobs:
echo "PYTHONPATH=$(pwd):$PYTHONPATH" >> $GITHUB_ENV
- name: Set Up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"

6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

@@ -45,7 +45,7 @@ jobs:
uses: actions/checkout@v4

- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

@@ -80,7 +80,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

11 changes: 10 additions & 1 deletion interfaces/adfsuite/ams.py
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
from typing import Dict, List, Literal, Set, Union

import numpy as np

from scm.plams.core.basejob import SingleJob
from scm.plams.core.errors import FileError, JobError, PlamsError, PTError, ResultsError
from scm.plams.core.functions import config, log, parse_heredoc
@@ -67,6 +68,12 @@ def on_any_event(self, event):
except FileNotFoundError:
self._seekto = 0

def trigger(self):
if self._job.path is None:
return
src_path = os.path.join(self._job.path, "ams.log")
self.on_any_event(FileModifiedEvent(src_path))

except ImportError:
_has_watchdog = False

@@ -2199,7 +2206,8 @@ def __init__(self, molecule: Union[Molecule, Dict[str, Molecule], None] = None,
def run(self, jobrunner=None, jobmanager=None, watch=False, **kwargs) -> AMSResults:
"""Run the job using *jobmanager* and *jobrunner* (or defaults, if ``None``).
If *watch* is set to ``True``, the contents of the AMS driver logfile will be forwarded line by line to the PLAMS logfile (and stdout), allowing for an easier monitoring of the running job. Not that the forwarding of the AMS driver logfile will cause make the call to this method block until the job's execution has finished, even when using a parallel |JobRunner|.
If *watch* is set to ``True``, the contents of the AMS driver logfile will be forwarded line by line to the PLAMS logfile (and stdout), allowing for an easier monitoring of the running job.
Not that the forwarding of the AMS driver logfile will make the call to this method block until the job's execution has finished, even when using a parallel |JobRunner|.
Other keyword arguments (*\*\*kwargs*) are stored in ``run`` branch of job's settings.
@@ -2220,6 +2228,7 @@ def run(self, jobrunner=None, jobmanager=None, watch=False, **kwargs) -> AMSResu
try:
results = super().run(jobrunner=jobrunner, jobmanager=jobmanager, **kwargs)
results.wait()
event_handler.trigger()
finally:
observer.stop()
observer.join()
8 changes: 6 additions & 2 deletions interfaces/adfsuite/ase_calculator.py
Original file line number Diff line number Diff line change
@@ -184,7 +184,7 @@ def __init__(self, settings=None, name="", amsworker=False, restart=True, molecu

self.settings = settings.copy()
self.amsworker = amsworker
self.name = name
self._name = name
self.restart = restart
self.molecule = molecule
extractors = settings.pop("Extractors", [])
@@ -209,7 +209,7 @@ def __init__(self, settings=None, name="", amsworker=False, restart=True, molecu
@property
def counter(self):
# this is needed for deepcopy/pickling etc
if not self.name in self._counter:
if self.name not in self._counter:
self.set_counter()
self._counter[self.name] += 1
return self._counter[self.name]
@@ -222,6 +222,10 @@ def implemented_properties(self):
"""Returns the list of properties that this calculator has implemented"""
return [extractor.name for extractor in self.extractors if extractor.check_settings(self.settings)]

@property
def name(self):
return self._name

def calculate(self, atoms=None, properties=["energy"], system_changes=all_changes):
"""Calculate the requested properties. If atoms is not set, it will reuse the last known Atoms object."""
if atoms is not None:
2 changes: 1 addition & 1 deletion mol/identify.py
Original file line number Diff line number Diff line change
@@ -321,7 +321,7 @@ def get_graph(mol, dic, level=1):
matrix *= identifiers.reshape((nats, 1))

# Create the graph
graph = networkx.from_numpy_matrix(matrix)
graph = networkx.from_numpy_array(matrix)

return graph

2 changes: 1 addition & 1 deletion mol/molecule.py
Original file line number Diff line number Diff line change
@@ -1570,7 +1570,7 @@ def locate_rings_networkx(self):
matrix = self.bond_matrix()
matrix = matrix.astype(np.int32)
matrix[matrix > 0] = 1
graph = networkx.from_numpy_matrix(matrix)
graph = networkx.from_numpy_array(matrix)
rings = networkx.cycle_basis(graph)
return rings

4 changes: 3 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -3,4 +3,6 @@ numpy==1.23.4
scipy==1.9.3
natsort==8.1.0
ase==3.22.1
rdkit==2024.03.1
rdkit==2024.03.1
networkx==2.8.8
watchdog==2.1.8
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2024.103"
__version__ = "2024.106"