7.3.1.6. ASE Parameters¶
This interface is used together with the general ASE Calculator interface that is part of the MLPotential engine of AMS.
You need to populate the parameter interface yourself. You choose the names yourself, your custom ASE calculator should be able to interpret them.
The write()
methods simply writes out the parameters in .yaml format. The ASE Calculator needs to be able to parse the ParAMS format.
See scripting/scm/params/examples/CustomASECalculator
for an example.
-
class
ASEParameters
(parameters=None, settings=None)¶ Interface to the parameterization of a custom ASE calculator inside the ASE engine.
-
__init__
(parameters=None, settings=None)¶ Create a new instance based on the parameterization in folder.
- parameters: list of Parameter
The parameters. They can have any names.
- settingsoptional, Settings
A settings instance with other settings to be used for the engine. Should start at normal root level of Settings instances used with the AMS driver, i.e. ASE engine input should be in
settings.input.ASE
.
-
_create_initial_parameters
(elements, atm_parameters, bnd_parameters)¶ A simple example for creating some initial parameters. But the parameter names can be chosen completely freely
Example:
elements=['H', 'O'], atm_parameters=['self_energy'], bnd_parameters=['k', 'r0']
will create the parametersATM:H:self_energy (range -100, 100)
ATM:O:self_energy (range -100, 100)
BND:H.H:k (range 0, 10)
BND:H.H:r0 (range 0, 10)
BND:H.O:k (range 0, 10)
BND:H.O:r0 (range 0, 10)
BND:O.O:k (range 0, 10)
BND:O.O:r0 (range 0, 10)
BND:O.H is not created, instead only BND.H.O (alphabetically sorted, arbitrary convention in this method, but feel free to choose any other parameter names)
-
write
(path, parameters=None)¶ Writes the current parameterization to disk.
-