stfc / janus-core

Tools for machine learnt interatomic potentials
https://stfc.github.io/janus-core/
BSD 3-Clause "New" or "Revised" License
9 stars 7 forks source link

Change pressure from bar to GPa #201

Closed ElliottKasoar closed 1 month ago

ElliottKasoar commented 1 month ago

Resolves #186

  1. Changes units from bar to GPa in MD and geomopt (CLI)
  2. Moves setting units for scalar_pressure when carrying out geometry optimization into calculation module. Previously this was only set for the geomopt CLI command, but this way it's set for anything that calls geomopt e.g. phonons, MD, EoS etc. and for the Python interface, so it's more consistent.

Is there a good way of signposting this? As I mention in #186, for any arbitrary kwargs passed to functions, ASE units should be assumed, so this is an exception.

When it's an explicit variable we make it clear, but is there an obvious way when it's passed via (potentially quite convoluted) kwargs e.g. --minimize-kwargs "{'filter_kwargs': {'scalar_pressure' : x}}"?

Also worth checking if I've missed obvious cases for other inconsistencies.

alinelena commented 1 month ago

@harveydevereux once this is in you will need to keep an eye... since there is a small change of units from bar to GPa as defaults. also is consistent now when passed to ase.