The principal aim of this PR is to allow the SCM ChemicalSystem support within PLAMS to be extended. Currently, it is supported for a ChemicalSystem can be passed into an AMSJob in place of a Molecule and have the job run successfully. In addition, a ChemicalSystem can now be retrieved from the AMSResults class via analogous methods to retrieving a Molecule.
In addition to facilitate this, unit test coverage has been added for the ams job and results classes, along with additional type-hinting and small bug fixes, detailed below.
Changes
Unit Tests
AMSJob
Unit tests added based off the output rkf files of a water geometry optimisation job. The small ams.rkf and dftb.rkf files have been added. A set of tests is then run for each of the following scenarios:
Input molecule and input settings
Input molecule and pisa settings
UCS molecule and input settings
AMSResults
Unit tests added based again on the output rkf files of the water geometry optimisation. This allows testing of a fair number of the result getter methods.
Note these tests can only be run with an AMS installation - not on the CI on GitHub.
AMSResults
In AMSResults missing type hints have been added. In addition, the following methods have been added to get UCS out:
this is in analogy with the methods to retrieve Molecule/ASE Atoms. All these methods will raise an error if scm libbase is not available. There are additional methods (such as for retrieving history), but these are the simplest starting set.
Fixes
ChemicalSystem is now added to the type hint on AMSJob. In addition, the passed molecule is deep copied when passed into the job. This mirrors the behaviour of a Molecule and is generally assumed behaviour. A few small unhappy paths have also been patched in the AMSResults methods.
In addition, a change has been made to the InputParserFacade. A bug has been fixed in the non-scm version of the input parser and an efficiency improvement for the scm libbase version of the parser, which caches the instance so that the json definitions do not need to be constantly reloaded.
Description
The principal aim of this PR is to allow the SCM
ChemicalSystem
support within PLAMS to be extended. Currently, it is supported for aChemicalSystem
can be passed into anAMSJob
in place of aMolecule
and have the job run successfully. In addition, aChemicalSystem
can now be retrieved from theAMSResults
class via analogous methods to retrieving aMolecule
.In addition to facilitate this, unit test coverage has been added for the ams job and results classes, along with additional type-hinting and small bug fixes, detailed below.
Changes
Unit Tests
AMSJob
Unit tests added based off the output rkf files of a water geometry optimisation job. The small
ams.rkf
anddftb.rkf
files have been added. A set of tests is then run for each of the following scenarios:AMSResults
Unit tests added based again on the output rkf files of the water geometry optimisation. This allows testing of a fair number of the result getter methods.
Note these tests can only be run with an AMS installation - not on the CI on GitHub.
AMSResults
In
AMSResults
missing type hints have been added. In addition, the following methods have been added to get UCS out:this is in analogy with the methods to retrieve Molecule/ASE Atoms. All these methods will raise an error if scm libbase is not available. There are additional methods (such as for retrieving history), but these are the simplest starting set.
Fixes
ChemicalSystem
is now added to the type hint onAMSJob
. In addition, the passed molecule is deep copied when passed into the job. This mirrors the behaviour of aMolecule
and is generally assumed behaviour. A few small unhappy paths have also been patched in theAMSResults
methods.In addition, a change has been made to the
InputParserFacade
. A bug has been fixed in the non-scm version of the input parser and an efficiency improvement for the scm libbase version of the parser, which caches the instance so that the json definitions do not need to be constantly reloaded.