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[Atoms], job_collection: JobCollection, data_set: 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.

   atoms : list of Atoms
      The atoms to be converted

   job_collection : JobCollection
      New jobs will be appended to this job collection.

   data_set : DataSet
      New data (energies and forces) will be appended to this dataset.

   prefix : str
      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: JobCollection, data_sets: List[DataSet], energy: bool = True, forces: bool = True) -> List[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_collection : JobCollection
      The job collection

   data_sets : list of DataSet
      The data sets.

   energy : bool
      Require that energy("jobid") is present in the data_set and
      store the energy in the output .xyz file

   forces : bool
      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
============================

ams_to_settings(fpath: str) -> Settings

   Extracts and returns the complete Settings of a job stored in
   *fpath*.  *Fpath* must either point to a *ams.rkf* or a **.run*
   file.


8.9.1.4. AMS Job to Engine
==========================

ams_to_engine(fpath: str) -> 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.
