from __future__ import annotations
from pathlib import Path
from typing import Iterable, Literal, Sequence
from scm.pisa.block import DriverBlock,EngineBlock,FixedBlock,FreeBlock,InputBlock
from scm.pisa.key import BoolKey,FloatKey,FloatListKey,IntKey,IntListKey,MultipleChoiceKey,PathStringKey,StringKey,BoolType
[docs]class Analysis(DriverBlock):
r"""
:ivar Task: The analysis task.
:vartype Task: Literal["RadialDistribution", "Histogram", "AutoCorrelation", "MeanSquareDisplacement", "AverageBinPlot"]
:ivar Title: Title to identify the analysis run. Only used by the GUI.
:vartype Title: str | StringKey
:ivar AutoCorrelation: All input related to auto correlation functions.
:vartype AutoCorrelation: Analysis._AutoCorrelation
:ivar AverageBinPlot: All input related to velocity profile
:vartype AverageBinPlot: Analysis._AverageBinPlot
:ivar Histogram: All input related to histograms.
:vartype Histogram: Analysis._Histogram
:ivar LoadSystem: Block that controls reading the chemical system from a KF file instead of the [System] block.
:vartype LoadSystem: Analysis._LoadSystem
:ivar MeanSquareDisplacement: All input related to mean square displacement functions.
:vartype MeanSquareDisplacement: Analysis._MeanSquareDisplacement
:ivar Print: This block controls the printing of additional information to stdout.
:vartype Print: Analysis._Print
:ivar RadialDistribution: All input related to radial distribution functions.
:vartype RadialDistribution: Analysis._RadialDistribution
:ivar System: Specification of the chemical system. For some applications more than one system may be present in the input. In this case, all systems except one must have a non-empty string ID specified after the System keyword. The system without an ID is considered the main one.
:vartype System: Analysis._System
:ivar TrajectoryInfo: All the info regarding the reading of the trajectory files.
:vartype TrajectoryInfo: Analysis._TrajectoryInfo
"""
[docs] class _AutoCorrelation(FixedBlock):
r"""
All input related to auto correlation functions.
:ivar ComputeStandardDeviation: Compute the standard deviation of the autocorrelation function. This will slow down the calculation by approximately a factor 2. The standard deviation takes into account the variance introduced by both the simulation time and by the contributing atoms.
:vartype ComputeStandardDeviation: BoolType | BoolKey
:ivar DataReading: The KF data can be read in and handled once, or blockwise. The former is memory intensive, but mostly faster. If Auto is selected, the data is read at once if it is less than 1 GB, and blockwise if it is more.
:vartype DataReading: Literal["Auto", "AtOnce", "BlockWise"]
:ivar LimitMaxFrame: If set to true (default), the program will exit if MaxFrame is selected larger than half the provided number of frames. This limit is only active is UseAllValues is set to false.
:vartype LimitMaxFrame: BoolType | BoolKey
:ivar MaxCorrelationTime: The maximum correlation time in fs. The default is half the simulation time, except when the PressureTensor is read from the ams.rkf, in which case it is 10 percent of the simulation time. The PressureTensor is read when the Properties PressureTensor, Viscosity, or ViscosityFromBinLog are selected.
:vartype MaxCorrelationTime: float | FloatKey
:ivar MaxFrame: The maximum number of frames for which the autocorrelation function will be computed. The default is half of the number of provided frames. Determines the same settings as MaxCorrelationTime. If both are set, MaxCorrelationTime will take precedence.
:vartype MaxFrame: int | IntKey
:ivar NPointsHighestFreq: The number of points (timesteps) used for the highest frequency displayed in spectrum. This determines up to which frequency the spectrum is displayed. If the spacing between time-steps used for the ACF is 1 fs, then by default the maximum frequency displayed is 0.25 fs-1 (or 8339 cm-1). This corresponds to a (default) value of NPointsHighestFreq of 4. A higher number selected here, will result in a lower maximum frequency returned by the program. The lowest possible value (spectrum up to highest possible frequency) is 2.
:vartype NPointsHighestFreq: int | IntKey
:ivar PerElement: Compute ACF for all elements in the system. Any other settings in the block will be used.
:vartype PerElement: BoolType | BoolKey
:ivar Property: Compute the ACF either from velocities (from rkf), the dipole moment (from coordinates and atomic charges in rkf), the dipole moment derivative (from velocities and atomic charges in rkf), from the pressure tensor (from rkf), or from values specified in input. Selecting DiffusionCoefficient is equivalent to selecting Velocities. The default, DipoleDerivativeFromCharges, results in the computation of an IR spectrum.DipoleMomentFromBinLog and ViscosityFromBinLog allow the relevant properties (dipole moment and pressure tensor respectively) to be read from the BinLog section of the trajectory file. In the BinLog section requested properties are stored every step (even if SamplingFreq was set to a higher number than 1) but only if this was specifically requested at the start of the MD simulation.
:vartype Property: Literal["Velocities", "DipoleMomentFromCharges", "DiffusionCoefficient", "DipoleDerivativeFromCharges", "PressureTensor", "Viscosity", "DipoleMomentFromBinLog", "ViscosityFromBinLog"]
:ivar UnwrapCoordinates: If the coordinates are involved in the requested property, those coordinates are wrapped into the box at each time step. If set to true, this keyword unwraps those coordinates so that the trajectory is continuous. If not provided the code uses automatic defaults.
:vartype UnwrapCoordinates: Literal["Auto", "Yes", "No"]
:ivar UseAllValues: By default the same number of values are used for each t-step in the ACF. This has the advantage that all values in the ACF are equally reliable, but it does mean that for the smaller timesteps much of the data is not used. To switch this off and use all data, UseAllValues can be set to true
:vartype UseAllValues: BoolType | BoolKey
:ivar WritePropertyToKF: Write the selected property to the KF files for every requested frame
:vartype WritePropertyToKF: BoolType | BoolKey
:ivar Atoms: Relevant if Property is set to Velocities, DipoleMomentFromCharges, DipoleDerivativeFromCharges, or DiffusionCoefficient. Atom numbers or elements for the set of atoms for which the property is read/computed. By default all atoms are used.
:vartype Atoms: Analysis._AutoCorrelation._Atoms
:ivar UseTimeDerivative: Possibly use the time derivative of the selected property (e.g. velocity or dipole moments).
:vartype UseTimeDerivative: Analysis._AutoCorrelation._UseTimeDerivative
:ivar VecElements: A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Velocities, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).
:vartype VecElements: Analysis._AutoCorrelation._VecElements
"""
[docs] class _Atoms(FixedBlock):
r"""
Relevant if Property is set to Velocities, DipoleMomentFromCharges, DipoleDerivativeFromCharges, or DiffusionCoefficient. Atom numbers or elements for the set of atoms for which the property is read/computed. By default all atoms are used.
:ivar Atom: Atom number.
:vartype Atom: int | IntKey
:ivar Element: Element Symbol Atom.
:vartype Element: str | StringKey
:ivar Region: Region name.
:vartype Region: str | StringKey
"""
def __post_init__(self):
self.Atom: int | IntKey = IntKey(name='Atom', comment='Atom number.', unique=False)
self.Element: str | StringKey = StringKey(name='Element', comment='Element Symbol Atom.', unique=False)
self.Region: str | StringKey = StringKey(name='Region', comment='Region name.', unique=False)
[docs] class _UseTimeDerivative(FixedBlock):
r"""
Possibly use the time derivative of the selected property (e.g. velocity or dipole moments).
:ivar Enabled: Enable the use of the time derivative of the property.
:vartype Enabled: BoolType | BoolKey
:ivar ProjectOutRotations: Take the rotations out of the time derivative.
:vartype ProjectOutRotations: BoolType | BoolKey
"""
def __post_init__(self):
self.Enabled: BoolType | BoolKey = BoolKey(name='Enabled', comment='Enable the use of the time derivative of the property.', default=False)
self.ProjectOutRotations: BoolType | BoolKey = BoolKey(name='ProjectOutRotations', comment='Take the rotations out of the time derivative.', hidden=True, default=False)
[docs] class _VecElements(FixedBlock):
r"""
A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Velocities, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).
:ivar Index: Element of the property vector.
:vartype Index: int | IntKey
"""
def __post_init__(self):
self.Index: int | IntKey = IntKey(name='Index', comment='Element of the property vector.', unique=False)
def __post_init__(self):
self.ComputeStandardDeviation: BoolType | BoolKey = BoolKey(name='ComputeStandardDeviation', comment='Compute the standard deviation of the autocorrelation function. This will slow down the calculation by approximately a factor 2. The standard deviation takes into account the variance introduced by both the simulation time and by the contributing atoms.', default=False)
self.DataReading: Literal["Auto", "AtOnce", "BlockWise"] = MultipleChoiceKey(name='DataReading', comment='The KF data can be read in and handled once, or blockwise. The former is memory intensive, but mostly faster. If Auto is selected, the data is read at once if it is less than 1 GB, and blockwise if it is more.', default='Auto', choices=['Auto', 'AtOnce', 'BlockWise'])
self.LimitMaxFrame: BoolType | BoolKey = BoolKey(name='LimitMaxFrame', comment='If set to true (default), the program will exit if MaxFrame is selected larger than half the provided number of frames. This limit is only active is UseAllValues is set to false.', default=True)
self.MaxCorrelationTime: float | FloatKey = FloatKey(name='MaxCorrelationTime', comment='The maximum correlation time in fs. The default is half the simulation time, except when the PressureTensor is read from the ams.rkf, in which case it is 10 percent of the simulation time. The PressureTensor is read when the Properties PressureTensor, Viscosity, or ViscosityFromBinLog are selected.')
self.MaxFrame: int | IntKey = IntKey(name='MaxFrame', comment='The maximum number of frames for which the autocorrelation function will be computed. The default is half of the number of provided frames. Determines the same settings as MaxCorrelationTime. If both are set, MaxCorrelationTime will take precedence.')
self.NPointsHighestFreq: int | IntKey = IntKey(name='NPointsHighestFreq', comment='The number of points (timesteps) used for the highest frequency displayed in spectrum. This determines up to which frequency the spectrum is displayed. If the spacing between time-steps used for the ACF is 1 fs, then by default the maximum frequency displayed is 0.25 fs-1 (or 8339 cm-1). This corresponds to a (default) value of NPointsHighestFreq of 4. A higher number selected here, will result in a lower maximum frequency returned by the program. The lowest possible value (spectrum up to highest possible frequency) is 2.', default=4)
self.PerElement: BoolType | BoolKey = BoolKey(name='PerElement', comment='Compute ACF for all elements in the system. Any other settings in the block will be used.', default=False)
self.Property: Literal["Velocities", "DipoleMomentFromCharges", "DiffusionCoefficient", "DipoleDerivativeFromCharges", "PressureTensor", "Viscosity", "DipoleMomentFromBinLog", "ViscosityFromBinLog"] = MultipleChoiceKey(name='Property', comment='Compute the ACF either from velocities (from rkf), the dipole moment (from coordinates and atomic charges in rkf), the dipole moment derivative (from velocities and atomic charges in rkf), from the pressure tensor (from rkf), or from values specified in input. Selecting DiffusionCoefficient is equivalent to selecting Velocities. The default, DipoleDerivativeFromCharges, results in the computation of an IR spectrum.DipoleMomentFromBinLog and ViscosityFromBinLog allow the relevant properties (dipole moment and pressure tensor respectively) to be read from the BinLog section of the trajectory file. In the BinLog section requested properties are stored every step (even if SamplingFreq was set to a higher number than 1) but only if this was specifically requested at the start of the MD simulation.', default='DipoleDerivativeFromCharges', choices=['Velocities', 'DipoleMomentFromCharges', 'DiffusionCoefficient', 'DipoleDerivativeFromCharges', 'PressureTensor', 'Viscosity', 'DipoleMomentFromBinLog', 'ViscosityFromBinLog'])
self.UnwrapCoordinates: Literal["Auto", "Yes", "No"] = MultipleChoiceKey(name='UnwrapCoordinates', comment='If the coordinates are involved in the requested property, those coordinates are wrapped into the box at each time step. If set to true, this keyword unwraps those coordinates so that the trajectory is continuous. If not provided the code uses automatic defaults.', default='Auto', choices=['Auto', 'Yes', 'No'])
self.UseAllValues: BoolType | BoolKey = BoolKey(name='UseAllValues', comment='By default the same number of values are used for each t-step in the ACF. This has the advantage that all values in the ACF are equally reliable, but it does mean that for the smaller timesteps much of the data is not used. To switch this off and use all data, UseAllValues can be set to true', default=False)
self.WritePropertyToKF: BoolType | BoolKey = BoolKey(name='WritePropertyToKF', comment='Write the selected property to the KF files for every requested frame', default=False)
self.Atoms: Analysis._AutoCorrelation._Atoms = self._Atoms(name='Atoms', comment='Relevant if Property is set to Velocities, DipoleMomentFromCharges, DipoleDerivativeFromCharges, or DiffusionCoefficient. Atom numbers or elements for the set of atoms for which the property is read/computed. By default all atoms are used.')
self.UseTimeDerivative: Analysis._AutoCorrelation._UseTimeDerivative = self._UseTimeDerivative(name='UseTimeDerivative', comment='Possibly use the time derivative of the selected property (e.g. velocity or dipole moments).')
self.VecElements: Analysis._AutoCorrelation._VecElements = self._VecElements(name='VecElements', comment='A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Velocities, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).')
[docs] class _AverageBinPlot(FixedBlock):
r"""
All input related to velocity profile
:ivar Nbins: Number of bins that are plotted
:vartype Nbins: int | IntKey
:ivar Atoms: Relevant if Properties are atom dependent. Atom numbers or elements for the set of atoms for which the property is read/computed. By default all atoms are used.
:vartype Atoms: Analysis._AverageBinPlot._Atoms
:ivar Property: Property to be plotted along the Y-axis
:vartype Property: Analysis._AverageBinPlot._Property
:ivar XProperty: Property to be plotted along the Y-axis
:vartype XProperty: Analysis._AverageBinPlot._XProperty
"""
[docs] class _Atoms(FixedBlock):
r"""
Relevant if Properties are atom dependent. Atom numbers or elements for the set of atoms for which the property is read/computed. By default all atoms are used.
:ivar Atom: Atom number.
:vartype Atom: int | IntKey
:ivar Element: Element Symbol Atom.
:vartype Element: str | StringKey
:ivar Region: Region name.
:vartype Region: str | StringKey
"""
def __post_init__(self):
self.Atom: int | IntKey = IntKey(name='Atom', comment='Atom number.', unique=False)
self.Element: str | StringKey = StringKey(name='Element', comment='Element Symbol Atom.', unique=False)
self.Region: str | StringKey = StringKey(name='Region', comment='Region name.', unique=False)
[docs] class _Property(FixedBlock):
r"""
Property to be plotted along the Y-axis
:ivar Axis: If defined the dot_product along this axis will be taken. Otherwise, the length of the property vector will be used.
:vartype Axis: Iterable[float] | FloatListKey
:ivar Name: Name of the property
:vartype Name: Literal["FrictionCoefficient", "Viscosity", "Velocities", "EngineGradients"]
"""
def __post_init__(self):
self.Axis: Iterable[float] | FloatListKey = FloatListKey(name='Axis', comment='If defined the dot_product along this axis will be taken. Otherwise, the length of the property vector will be used.')
self.Name: Literal["FrictionCoefficient", "Viscosity", "Velocities", "EngineGradients"] = MultipleChoiceKey(name='Name', comment='Name of the property', choices=['FrictionCoefficient', 'Viscosity', 'Velocities', 'EngineGradients'])
[docs] class _XProperty(FixedBlock):
r"""
Property to be plotted along the Y-axis
:ivar Name: Timestep used for the plotting
:vartype Name: Literal["Time", "Coords"]
:ivar VecElements: A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Velocities, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).
:vartype VecElements: Analysis._AverageBinPlot._XProperty._VecElements
"""
[docs] class _VecElements(FixedBlock):
r"""
A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Velocities, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).
:ivar Index: Element of the x_property, in case it is a vector (For Coords: 1 for X, 2 for Y, 3 for Z).
:vartype Index: int | IntKey
"""
def __post_init__(self):
self.Index: int | IntKey = IntKey(name='Index', comment='Element of the x_property, in case it is a vector (For Coords: 1 for X, 2 for Y, 3 for Z).', default=3)
def __post_init__(self):
self.Name: Literal["Time", "Coords"] = MultipleChoiceKey(name='Name', comment='Timestep used for the plotting', default='Time', choices=['Time', 'Coords'])
self.VecElements: Analysis._AverageBinPlot._XProperty._VecElements = self._VecElements(name='VecElements', comment='A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Velocities, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).')
def __post_init__(self):
self.Nbins: int | IntKey = IntKey(name='Nbins', comment='Number of bins that are plotted', default=10)
self.Atoms: Analysis._AverageBinPlot._Atoms = self._Atoms(name='Atoms', comment='Relevant if Properties are atom dependent. Atom numbers or elements for the set of atoms for which the property is read/computed. By default all atoms are used.')
self.Property: Analysis._AverageBinPlot._Property = self._Property(name='Property', comment='Property to be plotted along the Y-axis')
self.XProperty: Analysis._AverageBinPlot._XProperty = self._XProperty(name='XProperty', comment='Property to be plotted along the Y-axis')
[docs] class _Histogram(FixedBlock):
r"""
All input related to histograms.
:ivar KeepRemainder: Place the values that fall outside the range in an extra bin (on the right).
:vartype KeepRemainder: BoolType | BoolKey
:ivar Normalized: Give the normalized histogram.
:vartype Normalized: BoolType | BoolKey
:ivar Axes: Specifications for the histogram axes.
:vartype Axes: Analysis._Histogram._Axes
"""
[docs] class _Axes(FixedBlock):
r"""
Specifications for the histogram axes.
:ivar Axis: Specifications for a single histogram axis.
:vartype Axis: Analysis._Histogram._Axes._Axis
"""
[docs] class _Axis(FixedBlock):
r"""
Specifications for a single histogram axis.
:ivar NBins: The number of bins along the histogram axis.
:vartype NBins: int | IntKey
:ivar Range: Either one, two, or three real values. If one it is the stepsize. If two, it is the minimum value and the maximum value. If three, it is the minimum value, the maximum value, and the stepsize. The stepsize overrides NBins.
:vartype Range: Iterable[float] | FloatListKey
:ivar Variable: The quantity along the histogram axis.
:vartype Variable: str | StringKey
:ivar Atoms: Relevant if variable has a value per atom (e.g. Coords, Velocities). This block specifies indices or elements for the set of atoms for which the variable is to be read. By default all atoms are used.
:vartype Atoms: Analysis._Histogram._Axes._Axis._Atoms
:ivar VecElements: A set of indices referring to a subset of a vector. If the variable to be plotted has non-scalar values per step, then this block allows the selection of a subset of vector elements (e.g. 1 and 2 for the x and y values). Can be used in combination with the Atoms block.
:vartype VecElements: Analysis._Histogram._Axes._Axis._VecElements
"""
[docs] class _Atoms(FixedBlock):
r"""
Relevant if variable has a value per atom (e.g. Coords, Velocities). This block specifies indices or elements for the set of atoms for which the variable is to be read. By default all atoms are used.
:ivar Atom: Atom index.
:vartype Atom: int | IntKey
:ivar Element: Element Symbol Atom.
:vartype Element: str | StringKey
:ivar Region: Region name
:vartype Region: str | StringKey
"""
def __post_init__(self):
self.Atom: int | IntKey = IntKey(name='Atom', comment='Atom index.', unique=False)
self.Element: str | StringKey = StringKey(name='Element', comment='Element Symbol Atom.', unique=False)
self.Region: str | StringKey = StringKey(name='Region', comment='Region name', unique=False)
[docs] class _VecElements(FixedBlock):
r"""
A set of indices referring to a subset of a vector. If the variable to be plotted has non-scalar values per step, then this block allows the selection of a subset of vector elements (e.g. 1 and 2 for the x and y values). Can be used in combination with the Atoms block.
:ivar Index: Element of the property vector.
:vartype Index: int | IntKey
"""
def __post_init__(self):
self.Index: int | IntKey = IntKey(name='Index', comment='Element of the property vector.', unique=False)
def __post_init__(self):
self.NBins: int | IntKey = IntKey(name='NBins', comment='The number of bins along the histogram axis.', default=100)
self.Range: Iterable[float] | FloatListKey = FloatListKey(name='Range', comment='Either one, two, or three real values. If one it is the stepsize. If two, it is the minimum value and the maximum value. If three, it is the minimum value, the maximum value, and the stepsize. The stepsize overrides NBins.')
self.Variable: str | StringKey = StringKey(name='Variable', comment='The quantity along the histogram axis.')
self.Atoms: Analysis._Histogram._Axes._Axis._Atoms = self._Atoms(name='Atoms', comment='Relevant if variable has a value per atom (e.g. Coords, Velocities). This block specifies indices or elements for the set of atoms for which the variable is to be read. By default all atoms are used.')
self.VecElements: Analysis._Histogram._Axes._Axis._VecElements = self._VecElements(name='VecElements', comment='A set of indices referring to a subset of a vector. If the variable to be plotted has non-scalar values per step, then this block allows the selection of a subset of vector elements (e.g. 1 and 2 for the x and y values). Can be used in combination with the Atoms block.')
def __post_init__(self):
self.Axis: Analysis._Histogram._Axes._Axis = self._Axis(name='Axis', comment='Specifications for a single histogram axis.', unique=False)
def __post_init__(self):
self.KeepRemainder: BoolType | BoolKey = BoolKey(name='KeepRemainder', comment='Place the values that fall outside the range in an extra bin (on the right).', default=False)
self.Normalized: BoolType | BoolKey = BoolKey(name='Normalized', comment='Give the normalized histogram.', default=False)
self.Axes: Analysis._Histogram._Axes = self._Axes(name='Axes', comment='Specifications for the histogram axes.')
[docs] class _LoadSystem(FixedBlock):
r"""
Block that controls reading the chemical system from a KF file instead of the [System] block.
:ivar File: The path of the KF file from which to load the system. It may also be the results directory containing it.
:vartype File: str | Path | StringKey
:ivar Section: The section on the KF file from which to load the system.
:vartype Section: str | StringKey
"""
def __post_init__(self):
self.File: str | Path | StringKey = PathStringKey(name='File', comment='The path of the KF file from which to load the system. It may also be the results directory containing it.', ispath=True)
self.Section: str | StringKey = StringKey(name='Section', comment='The section on the KF file from which to load the system.', default='Molecule')
[docs] class _MeanSquareDisplacement(FixedBlock):
r"""
All input related to mean square displacement functions.
:ivar ComputeStandardDeviation: Compute the standard deviation of the mean square displacement. This will slow down the calculation by approximately a factor 2. The standard deviation takes into account the variance introduced by both the simulation time and by the contributing atoms.
:vartype ComputeStandardDeviation: BoolType | BoolKey
:ivar DataReading: The KF data can be read in and handled once, or blockwise. The former is memory intensive, but mostly faster. If Auto is selected, the data is read at once if it is less than 1 GB, and blockwise if it is more.
:vartype DataReading: Literal["Auto", "AtOnce", "BlockWise"]
:ivar LimitMaxFrame: If set to true (default), the program will exit if MaxFrame is selected larger than half the provided number of frames. This limit is only active is UseAllValues is set to false.
:vartype LimitMaxFrame: BoolType | BoolKey
:ivar MaxCorrelationTime: The maximum correlation time in fs. The default is half the simulation time.
:vartype MaxCorrelationTime: float | FloatKey
:ivar MaxFrame: The maximum number of frames for which the mean square displacement function will be computed. The default is half of the number of provided frames. Determines the same settings as MaxCorrelationTime. If both are set, MaxCorrelationTime will take precedence.
:vartype MaxFrame: int | IntKey
:ivar PerElement: Compute MSD for all elements in the system. Any other settings in thie block will be used.
:vartype PerElement: BoolType | BoolKey
:ivar Property: Compute the MSD from the property selected here (from rkf). Selecting DiffusionCoefficient is equivalent to selecting the property Coords.
:vartype Property: Literal["Coords", "DiffusionCoefficient", "Conductivity"]
:ivar StartTimeSlope: The MSD has a nonlinear regime at short timescales, and a linear regime at long timescales. To determine the slope, the starting point for the linear regime has to be determined. This keyword sets the starting time in fs. If set to zero, the starttime will be automatically determined.
:vartype StartTimeSlope: float | FloatKey
:ivar UnwrapCoordinates: If the coordinates are involved in the requested property, those coordinates are wrapped into the box at each time step. If set to true, this keyword unwraps those coordinates so that the trajectory is continuous. If not provided the code uses automatic defaults.
:vartype UnwrapCoordinates: Literal["Auto", "Yes", "No"]
:ivar UseAllValues: By default the same number of values are used for each t-step in the MSD. This has the advantage that all values in the MSD are equally reliable, but it does mean that for the smaller timesteps much of the data is not used. To switch this off and use all data, UseAllValues can be set to true
:vartype UseAllValues: BoolType | BoolKey
:ivar WritePropertyToKF: Write the selected property to the KF files for every requested frame
:vartype WritePropertyToKF: BoolType | BoolKey
:ivar Atoms: Relevant if Property is set to any quantity that is available per atom (Coords, DiffusionCoefficient). Atom numbers or elements for the set of atoms for which the property is read/computed are provided here. By default all atoms are used.
:vartype Atoms: Analysis._MeanSquareDisplacement._Atoms
:ivar UseMolecularCentersOfMass: Specifications on using the center of mass coordinates per molecule instead of coordinates per atom. Only relevant for properties that rely on coordinates: Coords, DiffusionCoefficient, and Conductivity.
:vartype UseMolecularCentersOfMass: Analysis._MeanSquareDisplacement._UseMolecularCentersOfMass
:ivar VecElements: A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Coords, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).
:vartype VecElements: Analysis._MeanSquareDisplacement._VecElements
"""
[docs] class _Atoms(FixedBlock):
r"""
Relevant if Property is set to any quantity that is available per atom (Coords, DiffusionCoefficient). Atom numbers or elements for the set of atoms for which the property is read/computed are provided here. By default all atoms are used.
:ivar Atom: Atom number.
:vartype Atom: int | IntKey
:ivar Element: Element Symbol Atom.
:vartype Element: str | StringKey
:ivar Region: Region name.
:vartype Region: str | StringKey
"""
def __post_init__(self):
self.Atom: int | IntKey = IntKey(name='Atom', comment='Atom number.', unique=False)
self.Element: str | StringKey = StringKey(name='Element', comment='Element Symbol Atom.', unique=False)
self.Region: str | StringKey = StringKey(name='Region', comment='Region name.', unique=False)
[docs] class _UseMolecularCentersOfMass(FixedBlock):
r"""
Specifications on using the center of mass coordinates per molecule instead of coordinates per atom. Only relevant for properties that rely on coordinates: Coords, DiffusionCoefficient, and Conductivity.
:ivar CheckForBondChanges: Check for each frame if the bonds still correspond to the input bonds. If they changed, an error is thrown. If this is set to false, it is assumed that the molecules stay in tact.
:vartype CheckForBondChanges: BoolType | BoolKey
:ivar Enabled: Use the center of mass coordinates per molecule. Only relevant for properties that rely on coordinates: Coords, DiffusionCoefficient, and Conductivity. The bonds from the MD input system are used.
:vartype Enabled: BoolType | BoolKey
"""
def __post_init__(self):
self.CheckForBondChanges: BoolType | BoolKey = BoolKey(name='CheckForBondChanges', comment='Check for each frame if the bonds still correspond to the input bonds. If they changed, an error is thrown. If this is set to false, it is assumed that the molecules stay in tact.', default=True)
self.Enabled: BoolType | BoolKey = BoolKey(name='Enabled', comment='Use the center of mass coordinates per molecule. Only relevant for properties that rely on coordinates: Coords, DiffusionCoefficient, and Conductivity. The bonds from the MD input system are used.', default=False)
[docs] class _VecElements(FixedBlock):
r"""
A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Coords, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).
:ivar Index: Element of the property vector.
:vartype Index: int | IntKey
"""
def __post_init__(self):
self.Index: int | IntKey = IntKey(name='Index', comment='Element of the property vector.', unique=False)
def __post_init__(self):
self.ComputeStandardDeviation: BoolType | BoolKey = BoolKey(name='ComputeStandardDeviation', comment='Compute the standard deviation of the mean square displacement. This will slow down the calculation by approximately a factor 2. The standard deviation takes into account the variance introduced by both the simulation time and by the contributing atoms.', default=False)
self.DataReading: Literal["Auto", "AtOnce", "BlockWise"] = MultipleChoiceKey(name='DataReading', comment='The KF data can be read in and handled once, or blockwise. The former is memory intensive, but mostly faster. If Auto is selected, the data is read at once if it is less than 1 GB, and blockwise if it is more.', default='Auto', choices=['Auto', 'AtOnce', 'BlockWise'])
self.LimitMaxFrame: BoolType | BoolKey = BoolKey(name='LimitMaxFrame', comment='If set to true (default), the program will exit if MaxFrame is selected larger than half the provided number of frames. This limit is only active is UseAllValues is set to false.', default=True)
self.MaxCorrelationTime: float | FloatKey = FloatKey(name='MaxCorrelationTime', comment='The maximum correlation time in fs. The default is half the simulation time.')
self.MaxFrame: int | IntKey = IntKey(name='MaxFrame', comment='The maximum number of frames for which the mean square displacement function will be computed. The default is half of the number of provided frames. Determines the same settings as MaxCorrelationTime. If both are set, MaxCorrelationTime will take precedence.')
self.PerElement: BoolType | BoolKey = BoolKey(name='PerElement', comment='Compute MSD for all elements in the system. Any other settings in thie block will be used.', default=False)
self.Property: Literal["Coords", "DiffusionCoefficient", "Conductivity"] = MultipleChoiceKey(name='Property', comment='Compute the MSD from the property selected here (from rkf). Selecting DiffusionCoefficient is equivalent to selecting the property Coords.', default='Coords', choices=['Coords', 'DiffusionCoefficient', 'Conductivity'])
self.StartTimeSlope: float | FloatKey = FloatKey(name='StartTimeSlope', comment='The MSD has a nonlinear regime at short timescales, and a linear regime at long timescales. To determine the slope, the starting point for the linear regime has to be determined. This keyword sets the starting time in fs. If set to zero, the starttime will be automatically determined.', default=0.0)
self.UnwrapCoordinates: Literal["Auto", "Yes", "No"] = MultipleChoiceKey(name='UnwrapCoordinates', comment='If the coordinates are involved in the requested property, those coordinates are wrapped into the box at each time step. If set to true, this keyword unwraps those coordinates so that the trajectory is continuous. If not provided the code uses automatic defaults.', default='Auto', choices=['Auto', 'Yes', 'No'])
self.UseAllValues: BoolType | BoolKey = BoolKey(name='UseAllValues', comment='By default the same number of values are used for each t-step in the MSD. This has the advantage that all values in the MSD are equally reliable, but it does mean that for the smaller timesteps much of the data is not used. To switch this off and use all data, UseAllValues can be set to true', default=False)
self.WritePropertyToKF: BoolType | BoolKey = BoolKey(name='WritePropertyToKF', comment='Write the selected property to the KF files for every requested frame', default=False)
self.Atoms: Analysis._MeanSquareDisplacement._Atoms = self._Atoms(name='Atoms', comment='Relevant if Property is set to any quantity that is available per atom (Coords, DiffusionCoefficient). Atom numbers or elements for the set of atoms for which the property is read/computed are provided here. By default all atoms are used.')
self.UseMolecularCentersOfMass: Analysis._MeanSquareDisplacement._UseMolecularCentersOfMass = self._UseMolecularCentersOfMass(name='UseMolecularCentersOfMass', comment='Specifications on using the center of mass coordinates per molecule instead of coordinates per atom. Only relevant for properties that rely on coordinates: Coords, DiffusionCoefficient, and Conductivity.')
self.VecElements: Analysis._MeanSquareDisplacement._VecElements = self._VecElements(name='VecElements', comment='A set of indices referring to a subset of the property vector. Works in combination with the atoms block. For example, in combination with the property Coords, the Atoms block allows the selection of a subset of atoms, while the VecElelements block allows the selection of a subset of vector elements (e.g. 1 and 2 for the elements x and y).')
[docs] class _Print(FixedBlock):
r"""
This block controls the printing of additional information to stdout.
:ivar Timers: Printing timing details to see how much time is spend in which part of the code.
:vartype Timers: Literal["None", "Normal", "Detail", "TooMuchDetail"]
"""
def __post_init__(self):
self.Timers: Literal["None", "Normal", "Detail", "TooMuchDetail"] = MultipleChoiceKey(name='Timers', comment='Printing timing details to see how much time is spend in which part of the code.', default='None', choices=['None', 'Normal', 'Detail', 'TooMuchDetail'])
[docs] class _RadialDistribution(FixedBlock):
r"""
All input related to radial distribution functions.
:ivar AssumeNoSystemChanges: The system (bonds and atoms) do not change during the simulation, so no checks are needed.
:vartype AssumeNoSystemChanges: BoolType | BoolKey
:ivar DistanceTypeSelection: Select only a certain type of interatomic distances.
:vartype DistanceTypeSelection: Literal["All", "InterMolecular", "IntraMolecular"]
:ivar KeepRemainder: Place the values that fall outside the range in an extra bin (on the right).
:vartype KeepRemainder: BoolType | BoolKey
:ivar NBins: The number of bins in the histogram.
:vartype NBins: int | IntKey
:ivar PairwisePerElement: Compute RDF for all element pairs (for all atoms in the system). Any other settings in the block will be used.
:vartype PairwisePerElement: BoolType | BoolKey
:ivar Range: Either one, two, or three real values. If one it is the stepsize. If two, it is the minimum value and the maximum value. If three, it is the minimum value, the maximum value, and the stepsize. The stepsize overrides NBins.
:vartype Range: Iterable[float] | FloatListKey
:ivar AtomsFrom: Atom numbers or elements for the first set of atoms in the radial distribution.
:vartype AtomsFrom: Analysis._RadialDistribution._AtomsFrom
:ivar AtomsTo: Atom numbers or elements for the second set of atoms in the radial distribution.
:vartype AtomsTo: Analysis._RadialDistribution._AtomsTo
"""
[docs] class _AtomsFrom(FixedBlock):
r"""
Atom numbers or elements for the first set of atoms in the radial distribution.
:ivar Atom: Atom number.
:vartype Atom: int | IntKey
:ivar Element: Element Symbol Atom.
:vartype Element: str | StringKey
:ivar Region: Region name.
:vartype Region: str | StringKey
"""
def __post_init__(self):
self.Atom: int | IntKey = IntKey(name='Atom', comment='Atom number.', unique=False, default=0)
self.Element: str | StringKey = StringKey(name='Element', comment='Element Symbol Atom.', unique=False)
self.Region: str | StringKey = StringKey(name='Region', comment='Region name.', unique=False)
[docs] class _AtomsTo(FixedBlock):
r"""
Atom numbers or elements for the second set of atoms in the radial distribution.
:ivar Atom: Atom number.
:vartype Atom: int | IntKey
:ivar Element: Element Symbol Atom.
:vartype Element: str | StringKey
:ivar Region: Region name.
:vartype Region: str | StringKey
"""
def __post_init__(self):
self.Atom: int | IntKey = IntKey(name='Atom', comment='Atom number.', unique=False, default=0)
self.Element: str | StringKey = StringKey(name='Element', comment='Element Symbol Atom.', unique=False)
self.Region: str | StringKey = StringKey(name='Region', comment='Region name.', unique=False)
def __post_init__(self):
self.AssumeNoSystemChanges: BoolType | BoolKey = BoolKey(name='AssumeNoSystemChanges', comment='The system (bonds and atoms) do not change during the simulation, so no checks are needed.', hidden=True, default=False)
self.DistanceTypeSelection: Literal["All", "InterMolecular", "IntraMolecular"] = MultipleChoiceKey(name='DistanceTypeSelection', comment='Select only a certain type of interatomic distances.', default='All', choices=['All', 'InterMolecular', 'IntraMolecular'])
self.KeepRemainder: BoolType | BoolKey = BoolKey(name='KeepRemainder', comment='Place the values that fall outside the range in an extra bin (on the right).', default=False)
self.NBins: int | IntKey = IntKey(name='NBins', comment='The number of bins in the histogram.', default=1000)
self.PairwisePerElement: BoolType | BoolKey = BoolKey(name='PairwisePerElement', comment='Compute RDF for all element pairs (for all atoms in the system). Any other settings in the block will be used.', default=False)
self.Range: Iterable[float] | FloatListKey = FloatListKey(name='Range', comment='Either one, two, or three real values. If one it is the stepsize. If two, it is the minimum value and the maximum value. If three, it is the minimum value, the maximum value, and the stepsize. The stepsize overrides NBins.')
self.AtomsFrom: Analysis._RadialDistribution._AtomsFrom = self._AtomsFrom(name='AtomsFrom', comment='Atom numbers or elements for the first set of atoms in the radial distribution.')
self.AtomsTo: Analysis._RadialDistribution._AtomsTo = self._AtomsTo(name='AtomsTo', comment='Atom numbers or elements for the second set of atoms in the radial distribution.')
[docs] class _System(FixedBlock):
r"""
Specification of the chemical system. For some applications more than one system may be present in the input. In this case, all systems except one must have a non-empty string ID specified after the System keyword. The system without an ID is considered the main one.
:ivar AllowCloseAtoms: No longer functional. Just here for backwards compatibility.
:vartype AllowCloseAtoms: BoolType | BoolKey
:ivar Charge: The system's total charge in atomic units.
:vartype Charge: float | FloatKey
:ivar FractionalCoords: Whether the atomic coordinates in the Atoms block are given in fractional coordinates of the lattice vectors. Requires the presence of the Lattice block.
:vartype FractionalCoords: BoolType | BoolKey
:ivar GeometryFile: Read the geometry from a file (instead of from Atoms and Lattice blocks). Supported formats: .xyz
:vartype GeometryFile: str | Path | StringKey
:ivar GuessBonds: Equivalent to 'Modify%GuessBonds'. Please update input file to use 'Modify' block instead.
:vartype GuessBonds: BoolType | BoolKey
:ivar LatticeStrain: Equivalent to 'Modify%LatticeStrain'. Please update input file to use 'Modify' block instead.
:vartype LatticeStrain: Iterable[float] | FloatListKey
:ivar MapAtomsToUnitCell: Equivalent to 'Modify%MapAtomsToUnitCell'. Please update input file to use 'Modify' block instead.
:vartype MapAtomsToUnitCell: BoolType | BoolKey
:ivar PerturbCoordinates: Equivalent to 'Modify%PerturbCoordinates'. Please update input file to use 'Modify' block instead.
:vartype PerturbCoordinates: float | FloatKey
:ivar PerturbLattice: Equivalent to 'Modify%PerturbLattice'. Please update input file to use 'Modify' block instead.
:vartype PerturbLattice: float | FloatKey
:ivar ShiftCoordinates: Equivalent to 'Modify%Translate', but in the unit of bohr by default. Please update input file to use 'Modify' block instead.
:vartype ShiftCoordinates: Iterable[float] | FloatListKey
:ivar SuperCell: Equivalent to 'Modify%SuperCell'. Please update input file to use 'Modify' block instead.
:vartype SuperCell: Iterable[int] | IntListKey
:ivar SuperCellTrafo: Equivalent to 'Modify%SuperCellTrafo'. Please update input file to use 'Modify' block instead.
:vartype SuperCellTrafo: Iterable[int] | IntListKey
:ivar Symmetrize: Equivalent to 'Modify%Symmetrize'. Please update input file to use 'Modify' block instead.
:vartype Symmetrize: BoolType | BoolKey
:ivar Atoms: The atom types and coordinates. Unit can be specified in the header. Default unit is Angstrom.
:vartype Atoms: str | Sequence[str] | FreeBlock
:ivar BondOrders: Defined bond orders. Each line should contain two atom indices, followed by the bond order (1, 1.5, 2, 3 for single, aromatic, double and triple bonds) and (optionally) the cell shifts for periodic systems. May be used by MM engines and for defining constraints. If the system is periodic and none of the bonds have the cell shift defined then AMS will attempt to determine them following the minimum image convention.
:vartype BondOrders: str | Sequence[str] | FreeBlock
:ivar ElectrostaticEmbedding: Container for electrostatic embedding options, which can be combined.
:vartype ElectrostaticEmbedding: Analysis._System._ElectrostaticEmbedding
:ivar Lattice: Up to three lattice vectors. Unit can be specified in the header. Default unit is Angstrom.
:vartype Lattice: str | Sequence[str] | FreeBlock
:ivar Modify: Modifications to make to the chemical system after construction. This block is read like a script and the modifications applied top to bottom.
:vartype Modify: Analysis._System._Modify
"""
[docs] class _Atoms(FreeBlock):
r"""
The atom types and coordinates. Unit can be specified in the header. Default unit is Angstrom.
"""
def __post_init__(self):
pass
[docs] class _BondOrders(FreeBlock):
r"""
Defined bond orders. Each line should contain two atom indices, followed by the bond order (1, 1.5, 2, 3 for single, aromatic, double and triple bonds) and (optionally) the cell shifts for periodic systems. May be used by MM engines and for defining constraints. If the system is periodic and none of the bonds have the cell shift defined then AMS will attempt to determine them following the minimum image convention.
"""
def __post_init__(self):
pass
[docs] class _ElectrostaticEmbedding(FixedBlock):
r"""
Container for electrostatic embedding options, which can be combined.
:ivar ElectricField: External homogeneous electric field with three Cartesian components: ex, ey, ez, the default unit being V/Å.
In atomic units: Hartree/(e bohr) = 51.422 V/Angstrom; the relation to SI units is: 1 Hartree/(e bohr) = 5.14 ... e11 V/m.
Supported by the engines adf, band, dftb and mopac.
For periodic systems the field may only have nonzero components orthogonal to the direction(s) of periodicity (i.e. for 1D periodic system the x-component of the electric field should be zero, while for 2D periodic systems both the x and y components should be zero. This options cannot be used for 3D periodic systems.
:vartype ElectricField: Iterable[float] | FloatListKey
:ivar MultipolePotential: External point charges (and dipoles).
:vartype MultipolePotential: Analysis._System._ElectrostaticEmbedding._MultipolePotential
"""
[docs] class _MultipolePotential(FixedBlock):
r"""
External point charges (and dipoles).
:ivar ChargeModel: A multipole may be represented by a point (with a singular potential at its location) or by a spherical Gaussian distribution.
:vartype ChargeModel: Literal["Point", "Gaussian"]
:ivar ChargeWidth: The width parameter in a.u. in case a Gaussian charge model is chosen. A negative value means that the width will be chosen automatically.
:vartype ChargeWidth: float | FloatKey
:ivar Coordinates: Positions and values of the multipoles, one per line. Each line has the following format:
x y z q, or
x y z q µx µy µz.
Here x, y, z are the coordinates in Å, q is the charge (in atomic units of charge) and µx, µy, µz are the (optional) dipole moment components (in atomic units, i.e. e*Bohr).
Periodic systems are not supported.
:vartype Coordinates: str | Sequence[str] | FreeBlock
"""
[docs] class _Coordinates(FreeBlock):
r"""
Positions and values of the multipoles, one per line. Each line has the following format:
x y z q, or
x y z q µx µy µz.
Here x, y, z are the coordinates in Å, q is the charge (in atomic units of charge) and µx, µy, µz are the (optional) dipole moment components (in atomic units, i.e. e*Bohr).
Periodic systems are not supported.
"""
def __post_init__(self):
pass
def __post_init__(self):
self.ChargeModel: Literal["Point", "Gaussian"] = MultipleChoiceKey(name='ChargeModel', comment='A multipole may be represented by a point (with a singular potential at its location) or by a spherical Gaussian distribution.', default='Point', choices=['Point', 'Gaussian'])
self.ChargeWidth: float | FloatKey = FloatKey(name='ChargeWidth', comment='The width parameter in a.u. in case a Gaussian charge model is chosen. A negative value means that the width will be chosen automatically.', default=-1.0)
self.Coordinates: str | Sequence[str] | FreeBlock = self._Coordinates(name='Coordinates', comment='Positions and values of the multipoles, one per line. Each line has the following format:\n\nx y z q, or\nx y z q µx µy µz.\n\nHere x, y, z are the coordinates in Å, q is the charge (in atomic units of charge) and µx, µy, µz are the (optional) dipole moment components (in atomic units, i.e. e*Bohr). \n\nPeriodic systems are not supported.', header=True)
def __post_init__(self):
self.ElectricField: Iterable[float] | FloatListKey = FloatListKey(name='ElectricField', comment='External homogeneous electric field with three Cartesian components: ex, ey, ez, the default unit being V/Å.\n\nIn atomic units: Hartree/(e bohr) = 51.422 V/Angstrom; the relation to SI units is: 1 Hartree/(e bohr) = 5.14 ... e11 V/m.\n\nSupported by the engines adf, band, dftb and mopac.\n\nFor periodic systems the field may only have nonzero components orthogonal to the direction(s) of periodicity (i.e. for 1D periodic system the x-component of the electric field should be zero, while for 2D periodic systems both the x and y components should be zero. This options cannot be used for 3D periodic systems.', unit='V/Angstrom')
self.MultipolePotential: Analysis._System._ElectrostaticEmbedding._MultipolePotential = self._MultipolePotential(name='MultipolePotential', comment='External point charges (and dipoles).')
[docs] class _Lattice(FreeBlock):
r"""
Up to three lattice vectors. Unit can be specified in the header. Default unit is Angstrom.
"""
def __post_init__(self):
pass
[docs] class _Modify(FixedBlock):
r"""
Modifications to make to the chemical system after construction. This block is read like a script and the modifications applied top to bottom.
:ivar EnableAtomicProperties: Enables an atomic property group. This is only necessary if you want a group enabled, but no atom in the input is using any property from that group.
:vartype EnableAtomicProperties: Literal["gui", "adf", "band", "forcefield", "dftb", "reaxff", "qe"]
:ivar GuessBonds: Guesses bonds based on the atomic elements and the geometry. Keeps existing bonds.
:vartype GuessBonds: BoolType | BoolKey
:ivar LatticeStrain: Deform the input system by the specified strain. The strain elements are in Voigt notation, so one should specify 6 numbers for 3D periodic system (order: xx,yy,zz,yz,xz,xy), 3 numbers for 2D periodic systems (order: xx,yy,xy) or 1 number for 1D periodic systems.
:vartype LatticeStrain: Iterable[float] | FloatListKey
:ivar MapAtomsToUnitCell: For periodic systems the atoms will be moved to the central unit cell where all their fractional coordinates are in the range [start_range,start_range+1). No mapping will take place along non-periodic directions. If just a single number is given, it corresponds to start_range. If multiple numbers are given, they should match the number of lattice vectors and will be used as start ranges along the individual lattice vectors. If no number is given at all, the mapping will be done to the [-0.5:0.5) cell.
:vartype MapAtomsToUnitCell: Iterable[float] | FloatListKey
:ivar PerturbCoordinates: Perturb the atomic coordinates by adding random numbers between [-PerturbCoordinates,PerturbCoordinates] to each Cartesian component. This can be useful if you want to break the symmetry of your system (e.g. for a geometry optimization).
:vartype PerturbCoordinates: float | FloatKey
:ivar PerturbLattice: Perturb the lattice vectors by applying random strain with matrix elements between [-PerturbLattice,PerturbLattice]. This can be useful if you want to deviate from an ideal symmetric geometry, for example if you look for a phase change due to high pressure.
:vartype PerturbLattice: float | FloatKey
:ivar SuperCell: Create a supercell of the input system (only possible for periodic systems). The integer numbers represent the diagonal elements of the supercell transformation; you should specify as many numbers as lattice vectors (i.e. 1 number for 1D, 2 numbers for 2D and 3 numbers for 3D periodic systems).
:vartype SuperCell: Iterable[int] | IntListKey
:ivar SuperCellTrafo: Create a supercell of the input system (only possible for periodic systems) :math:`\vec{a}_i' = \sum_j T_{ij} \vec{a}_j`. The integer numbers represent the supercell transformation :math:`T_{ij}`: 1 number for 1D PBC, 4 numbers for 2D PBC corresponding to a 2x2 matrix (order: (1,1),(1,2),(2,1),(2,2)) and 9 numbers for 3D PBC corresponding to a 3x3 matrix (order: (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)).
:vartype SuperCellTrafo: Iterable[int] | IntListKey
:ivar Symmetrize: Symmetrizes the atomic coordinates to machine precision and rototranslates the molecule to the AMS standard orientation. This allows optimal use of the system's symmetry for calculations with the AMS driver and its engines.
:vartype Symmetrize: BoolType | BoolKey
:ivar Translate: Translate all atoms by a vector.
:vartype Translate: Iterable[float] | FloatListKey
"""
def __post_init__(self):
self.EnableAtomicProperties: Literal["gui", "adf", "band", "forcefield", "dftb", "reaxff", "qe"] = MultipleChoiceKey(name='EnableAtomicProperties', comment='Enables an atomic property group. This is only necessary if you want a group enabled, but no atom in the input is using any property from that group.', unique=False, choices=['gui', 'adf', 'band', 'forcefield', 'dftb', 'reaxff', 'qe'])
self.GuessBonds: BoolType | BoolKey = BoolKey(name='GuessBonds', comment='Guesses bonds based on the atomic elements and the geometry. Keeps existing bonds.', unique=False)
self.LatticeStrain: Iterable[float] | FloatListKey = FloatListKey(name='LatticeStrain', comment='Deform the input system by the specified strain. The strain elements are in Voigt notation, so one should specify 6 numbers for 3D periodic system (order: xx,yy,zz,yz,xz,xy), 3 numbers for 2D periodic systems (order: xx,yy,xy) or 1 number for 1D periodic systems.', unique=False)
self.MapAtomsToUnitCell: Iterable[float] | FloatListKey = FloatListKey(name='MapAtomsToUnitCell', comment='For periodic systems the atoms will be moved to the central unit cell where all their fractional coordinates are in the range [start_range,start_range+1). No mapping will take place along non-periodic directions. If just a single number is given, it corresponds to start_range. If multiple numbers are given, they should match the number of lattice vectors and will be used as start ranges along the individual lattice vectors. If no number is given at all, the mapping will be done to the [-0.5:0.5) cell.', unique=False)
self.PerturbCoordinates: float | FloatKey = FloatKey(name='PerturbCoordinates', comment='Perturb the atomic coordinates by adding random numbers between [-PerturbCoordinates,PerturbCoordinates] to each Cartesian component. This can be useful if you want to break the symmetry of your system (e.g. for a geometry optimization).', unique=False, unit='angstrom')
self.PerturbLattice: float | FloatKey = FloatKey(name='PerturbLattice', comment='Perturb the lattice vectors by applying random strain with matrix elements between [-PerturbLattice,PerturbLattice]. This can be useful if you want to deviate from an ideal symmetric geometry, for example if you look for a phase change due to high pressure.', unique=False)
self.SuperCell: Iterable[int] | IntListKey = IntListKey(name='SuperCell', comment='Create a supercell of the input system (only possible for periodic systems). The integer numbers represent the diagonal elements of the supercell transformation; you should specify as many numbers as lattice vectors (i.e. 1 number for 1D, 2 numbers for 2D and 3 numbers for 3D periodic systems).', unique=False)
self.SuperCellTrafo: Iterable[int] | IntListKey = IntListKey(name='SuperCellTrafo', comment="Create a supercell of the input system (only possible for periodic systems) :math:`\\vec{a}_i' = \\sum_j T_{ij} \\vec{a}_j`. The integer numbers represent the supercell transformation :math:`T_{ij}`: 1 number for 1D PBC, 4 numbers for 2D PBC corresponding to a 2x2 matrix (order: (1,1),(1,2),(2,1),(2,2)) and 9 numbers for 3D PBC corresponding to a 3x3 matrix (order: (1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)).", unique=False)
self.Symmetrize: BoolType | BoolKey = BoolKey(name='Symmetrize', comment="Symmetrizes the atomic coordinates to machine precision and rototranslates the molecule to the AMS standard orientation. This allows optimal use of the system's symmetry for calculations with the AMS driver and its engines.", unique=False, default=False)
self.Translate: Iterable[float] | FloatListKey = FloatListKey(name='Translate', comment='Translate all atoms by a vector.', unique=False, unit='angstrom')
def __post_init__(self):
self.AllowCloseAtoms: BoolType | BoolKey = BoolKey(name='AllowCloseAtoms', comment='No longer functional. Just here for backwards compatibility.', hidden=True, default=True)
self.Charge: float | FloatKey = FloatKey(name='Charge', comment="The system's total charge in atomic units.", gui_name='Total charge:', default=0.0, engines='-forcefield')
self.FractionalCoords: BoolType | BoolKey = BoolKey(name='FractionalCoords', comment='Whether the atomic coordinates in the Atoms block are given in fractional coordinates of the lattice vectors. Requires the presence of the Lattice block.', default=False)
self.GeometryFile: str | Path | StringKey = PathStringKey(name='GeometryFile', comment='Read the geometry from a file (instead of from Atoms and Lattice blocks). Supported formats: .xyz', ispath=True)
self.GuessBonds: BoolType | BoolKey = BoolKey(name='GuessBonds', comment="Equivalent to 'Modify%GuessBonds'. Please update input file to use 'Modify' block instead.", hidden=True)
self.LatticeStrain: Iterable[float] | FloatListKey = FloatListKey(name='LatticeStrain', comment="Equivalent to 'Modify%LatticeStrain'. Please update input file to use 'Modify' block instead.", hidden=True)
self.MapAtomsToUnitCell: BoolType | BoolKey = BoolKey(name='MapAtomsToUnitCell', comment="Equivalent to 'Modify%MapAtomsToUnitCell'. Please update input file to use 'Modify' block instead.", hidden=True)
self.PerturbCoordinates: float | FloatKey = FloatKey(name='PerturbCoordinates', comment="Equivalent to 'Modify%PerturbCoordinates'. Please update input file to use 'Modify' block instead.", hidden=True, unit='angstrom')
self.PerturbLattice: float | FloatKey = FloatKey(name='PerturbLattice', comment="Equivalent to 'Modify%PerturbLattice'. Please update input file to use 'Modify' block instead.", hidden=True)
self.ShiftCoordinates: Iterable[float] | FloatListKey = FloatListKey(name='ShiftCoordinates', comment="Equivalent to 'Modify%Translate', but in the unit of bohr by default. Please update input file to use 'Modify' block instead.", hidden=True, unit='bohr')
self.SuperCell: Iterable[int] | IntListKey = IntListKey(name='SuperCell', comment="Equivalent to 'Modify%SuperCell'. Please update input file to use 'Modify' block instead.", hidden=True)
self.SuperCellTrafo: Iterable[int] | IntListKey = IntListKey(name='SuperCellTrafo', comment="Equivalent to 'Modify%SuperCellTrafo'. Please update input file to use 'Modify' block instead.", hidden=True)
self.Symmetrize: BoolType | BoolKey = BoolKey(name='Symmetrize', comment="Equivalent to 'Modify%Symmetrize'. Please update input file to use 'Modify' block instead.", hidden=True, default=False)
self.Atoms: str | Sequence[str] | FreeBlock = self._Atoms(name='Atoms', comment='The atom types and coordinates. Unit can be specified in the header. Default unit is Angstrom.', header=True)
self.BondOrders: str | Sequence[str] | FreeBlock = self._BondOrders(name='BondOrders', comment='Defined bond orders. Each line should contain two atom indices, followed by the bond order (1, 1.5, 2, 3 for single, aromatic, double and triple bonds) and (optionally) the cell shifts for periodic systems. May be used by MM engines and for defining constraints. If the system is periodic and none of the bonds have the cell shift defined then AMS will attempt to determine them following the minimum image convention.')
self.ElectrostaticEmbedding: Analysis._System._ElectrostaticEmbedding = self._ElectrostaticEmbedding(name='ElectrostaticEmbedding', comment='Container for electrostatic embedding options, which can be combined.')
self.Lattice: str | Sequence[str] | FreeBlock = self._Lattice(name='Lattice', comment='Up to three lattice vectors. Unit can be specified in the header. Default unit is Angstrom.', header=True)
self.Modify: Analysis._System._Modify = self._Modify(name='Modify', comment='Modifications to make to the chemical system after construction. This block is read like a script and the modifications applied top to bottom.', ordered=True)
[docs] class _TrajectoryInfo(FixedBlock):
r"""
All the info regarding the reading of the trajectory files.
:ivar NBlocksToCompare: Get an error estimate by comparing histograms for NBLocks time blocks of the trajectory.
:vartype NBlocksToCompare: int | IntKey
:ivar Trajectory: All info regarding the reading of a single trajectory file.
:vartype Trajectory: Analysis._TrajectoryInfo._Trajectory
"""
[docs] class _Trajectory(FixedBlock):
r"""
All info regarding the reading of a single trajectory file.
:ivar KFFilename: The name of the AMS trajectory file.
:vartype KFFilename: str | Path | StringKey
:ivar Range: One or two values: start frame, and optionally end frame. By default the first and last frame are read.
:vartype Range: Iterable[int] | IntListKey
:ivar StepSize: The step size at which frames are read from the RKF (default 1, every frame is read).
:vartype StepSize: int | IntKey
"""
def __post_init__(self):
self.KFFilename: str | Path | StringKey = PathStringKey(name='KFFilename', comment='The name of the AMS trajectory file.', default='ams.rkf', ispath=True)
self.Range: Iterable[int] | IntListKey = IntListKey(name='Range', comment='One or two values: start frame, and optionally end frame. By default the first and last frame are read.')
self.StepSize: int | IntKey = IntKey(name='StepSize', comment='The step size at which frames are read from the RKF (default 1, every frame is read).', default=1)
def __post_init__(self):
self.NBlocksToCompare: int | IntKey = IntKey(name='NBlocksToCompare', comment='Get an error estimate by comparing histograms for NBLocks time blocks of the trajectory.', default=1)
self.Trajectory: Analysis._TrajectoryInfo._Trajectory = self._Trajectory(name='Trajectory', comment='All info regarding the reading of a single trajectory file.', unique=False)
def __post_init__(self):
self.Task: Literal["RadialDistribution", "Histogram", "AutoCorrelation", "MeanSquareDisplacement", "AverageBinPlot"] = MultipleChoiceKey(name='Task', comment='The analysis task.', choices=['RadialDistribution', 'Histogram', 'AutoCorrelation', 'MeanSquareDisplacement', 'AverageBinPlot'])
self.Title: str | StringKey = StringKey(name='Title', comment='Title to identify the analysis run. Only used by the GUI.', default='')
self.AutoCorrelation: Analysis._AutoCorrelation = self._AutoCorrelation(name='AutoCorrelation', comment='All input related to auto correlation functions.', unique=False)
self.AverageBinPlot: Analysis._AverageBinPlot = self._AverageBinPlot(name='AverageBinPlot', comment='All input related to velocity profile', unique=False)
self.Histogram: Analysis._Histogram = self._Histogram(name='Histogram', comment='All input related to histograms.', unique=False)
self.LoadSystem: Analysis._LoadSystem = self._LoadSystem(name='LoadSystem', comment='Block that controls reading the chemical system from a KF file instead of the [System] block.', unique=False, header=True, extra_info='not_in_fragment', shared_id='AMSLoadSystem')
self.MeanSquareDisplacement: Analysis._MeanSquareDisplacement = self._MeanSquareDisplacement(name='MeanSquareDisplacement', comment='All input related to mean square displacement functions.', unique=False)
self.Print: Analysis._Print = self._Print(name='Print', comment='This block controls the printing of additional information to stdout.')
self.RadialDistribution: Analysis._RadialDistribution = self._RadialDistribution(name='RadialDistribution', comment='All input related to radial distribution functions.', unique=False)
self.System: Analysis._System = self._System(name='System', comment='Specification of the chemical system. For some applications more than one system may be present in the input. In this case, all systems except one must have a non-empty string ID specified after the System keyword. The system without an ID is considered the main one.', unique=False, header=True, gui_type='Repeat at least once', shared_id='AMSSystem')
self.TrajectoryInfo: Analysis._TrajectoryInfo = self._TrajectoryInfo(name='TrajectoryInfo', comment='All the info regarding the reading of the trajectory files.')