cp2k_to_prm¶
FOX.io.cp2k_to_prm¶
A TypedMapping
subclass converting CP2K settings to .prm-compatible values.
Index¶
PRMMapping (name, key, columns, key_path, …) |
A TypedMapping providing tools for converting CP2K settings to .prm-compatible values. |
CP2K_TO_PRM |
API¶
-
class
FOX.io.cp2k_to_prm.
PRMMapping
(name, key, columns, key_path, unit, default_unit, post_process)[source]¶ A
TypedMapping
providing tools for converting CP2K settings to .prm-compatible values.Parameters: - name (
str
) – The name of thePRMContainer
attribute. SeePRMMapping.name
. - columns (
int
orIterable
[int
]) – The names relevantPRMContainer
DataFrame columns. SeePRMMapping.columns
. - key_path (
str
orIterable
[str
]) – The path of CP2K Settings keys leading to the property of interest. SeePRMMapping.key_path
. - key (
str
orIterable
[str
]) – The key(s) withinPRMMapping.key_path
containg the actual properties of interest, e.g."epsilon"
and"sigma"
. SeePRMMapping.key
. - unit (
str
orIterable
[str
]) – The desired output unit. SeePRMMapping.unit
. - default_unit (
str
orIterable
[str
, optional]) – The default unit as utilized by CP2K. SeePRMMapping.default_unit
. - post_process (
Callable
orIterable
[Callable
]) – Callables for post-processing the value of interest. Set a particular callable toNone
to disable post-processing. SeePRMMapping.post_process
.
-
name
¶ The name of the
PRMContainer
attribute.Type: str
-
columns
¶ The names relevant
PRMContainer
DataFrame columns.Type: tuple
[int
]
-
key
¶ The key(s) within
PRMMapping.key_path
containg the actual properties of interest, e.g."epsilon"
and"sigma"
.Type: tuple
[str
]
- name (
-
FOX.io.cp2k_to_prm.
CP2K_TO_PRM
: MappingProxyType[str, PRMMapping]¶ A
Mapping
containingPRMMapping
instances.MappingProxyType({ 'nonbonded': PRMMapping(name='nbfix', columns=[2, 3], key_path=('input', 'force_eval', 'mm', 'forcefield', 'nonbonded', 'lennard-jones'), key=('epsilon', 'sigma'), unit=('kcal/mol', 'angstrom'), default_unit=('kcal/mol', 'kelvin'), post_process=(None, sigma_to_r2)), 'nonbonded14': PRMMapping(name='nbfix', columns=[4, 5], key_path=('input', 'force_eval', 'mm', 'forcefield', 'nonbonded14', 'lennard-jones'), key=('epsilon', 'sigma'), unit=('kcal/mol', 'angstrom'), default_unit=('kcal/mol', 'kelvin'), post_process=(None, sigma_to_r2)), 'bonds': PRMMapping(name='bonds', columns=[2, 3], key_path=('input', 'force_eval', 'mm', 'forcefield', 'bond'), key=('k', 'r0'), unit=('kcal/mol/A**2', 'angstrom'), default_unit=('internal_cp2k', 'bohr'), # TODO: internal_cp2k ????????? post_process=(None, None)), 'angles': PRMMapping(name='angles', columns=[3, 4], key_path=('input', 'force_eval', 'mm', 'forcefield', 'bend'), key=('k', 'theta0'), unit=('kcal/mol', 'degree'), default_unit=('hartree', 'radian'), post_process=(None, None)), 'urrey-bradley': PRMMapping(name='angles', columns=[5, 6], key_path=('input', 'force_eval', 'mm', 'forcefield', 'bend', 'ub'), key=('k', 'r0'), unit=('kcal/mol/A**2', 'angstrom'), default_unit=('internal_cp2k', 'bohr'), # TODO: internal_cp2k ????????? post_process=(None, None)), 'dihedrals': PRMMapping(name='dihedrals', columns=[4, 5, 6], key_path=('input', 'force_eval', 'mm', 'forcefield', 'torsion'), key=('k', 'm', 'phi0'), unit=('kcal/mol', 'hartree', 'degree'), default_unit=('hartree', 'hartree', 'radian'), post_process=(None, None, None)), 'improper': PRMMapping(name='improper', columns=[4, 5, 6], key_path=('input', 'force_eval', 'mm', 'forcefield', 'improper'), key=('k', 'k', 'phi0'), unit=('kcal/mol', 'hartree', 'degree'), default_unit=('hartree', 'hartree', 'radian'), post_process=(None, return_zero, None)), })