Skip to content

Commit

Permalink
Fixed PET and rascal drivers (i-pi#310)
Browse files Browse the repository at this point in the history
* Fixed PET and rascal drivers
  • Loading branch information
ceriottm authored Feb 8, 2024
1 parent 674ddeb commit 6e9ae0a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
7 changes: 2 additions & 5 deletions drivers/py/pes/pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PET_driver(Dummy_driver):
def __init__(self, args=None, verbose=False):
self.error_msg = """
The PET driver requires specification of a .json model file fitted with
the PET tools, and a template file that describes the chemical makeup of
the PET tools, and a template file that describes the chemical makeup of
the structure.
Example: python driver.py -m pet -u -o model.json,template.xyz
Expand All @@ -43,10 +43,7 @@ def check_arguments(self):
This loads the potential and atoms template in PET
"""
try:
arglist = self.args.split(",")
except ValueError:
sys.exit(self.error_msg)
arglist = self.args

if len(arglist) == 2:
self.model_path = arglist[0]
Expand Down
5 changes: 1 addition & 4 deletions drivers/py/pes/rascal.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ def check_arguments(self):
This loads the potential and atoms template in librascal
"""
try:
arglist = self.args
except ValueError:
sys.exit(self.error_msg)
arglist = self.args

if len(arglist) == 2:
self.model = arglist[0]
Expand Down
10 changes: 9 additions & 1 deletion examples/clients/pet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ wget https://zenodo.org/records/10250171/files/methane.pet_small.zip
unzip methane.pet_small.zip
```

After having obtained the potential file, the example can be run as usual
A version of the PET code that is compatible with this example can be
obtained with

```bash
pip install git+https://github.com/serfg/pet@83454c6
```

After having obtained the potential file, and a compatible version of PET,
the example can be run as usual

```bash
i-pi input.xml &> log.ipi &
Expand Down

0 comments on commit 6e9ae0a

Please sign in to comment.