8.9.1. ParAMS Converters¶
Functions that convert various data and job types to/from ParAMS-readable formats.
8.9.1.1. ASE to ParAMS¶
Convert from ASE (Atomic Simulation Environment) to ParAMS.
-
ase_to_params
(atoms: List[ase.atoms.Atoms], job_collection: scm.params.core.jobcollection.JobCollection, data_set: scm.params.core.dataset.DataSet, prefix: str = 'frame')¶ For ASE list-of-atoms with .get_potential_energy() and .get_forces(), convert all frames to params singlepoints with properties gradients=yes and the energy() and forces() extractor in data_set.
- atomslist of Atoms
The atoms to be converted
- job_collectionJobCollection
New jobs will be appended to this job collection.
- data_setDataSet
New data (energies and forces) will be appended to this dataset.
- prefixstr
The names in the job collection will get this prefix.
8.9.1.2. ParAMS to ASE¶
Convert from ParAMS job collection and data sets into a list of ASE (Atomic Simulation Environment) Atoms
-
params_to_ase
(job_collection: scm.params.core.jobcollection.JobCollection, data_sets: List[scm.params.core.dataset.DataSet], energy: bool = True, forces: bool = True) → List[ase.atoms.Atoms]¶ Convert a job collection and dataset to a list of ASE atoms with .get_potential_energy() and .get_forces() attributes.
Only SinglePoint jobs from the job collection are read.
- job_collectionJobCollection
The job collection
- data_setslist of DataSet
The data sets.
- energybool
Require that energy(“jobid”) is present in the data_set and store the energy in the output .xyz file
- forcesbool
Require that forces(“jobid”) is present in the data_set and store the forces in the output .xyz file
The units are converted to ASE units (i.e. eV and eV/ang.).
Note: entries like 2*energy(‘job’) will give incorrect energies, and entries like forces(‘job’, 0) will give all force components.
Note: the order of the returned Atoms will match those in the JobCollection, NOT respecting any order in training/validation sets
Returns : list of Atoms
8.9.1.3. AMS Job to Settings¶
8.9.1.4. AMS Job to Engine¶
-
ams_to_engine
(fpath: str) → scm.params.core.engines.Engine¶ Extracts and returns the
Engine
associated with a job stored in fpath.
Fpath must either point to a ams.rkf or a *.run file.