amep.evaluate.Tconf#
- class amep.evaluate.Tconf(traj: ParticleTrajectory, drU: Callable, dr2U: Callable, skip: float = 0.0, nav: int = 10, ptype: int | None = None, **kwargs)#
Bases:
BaseEvaluationConfigurational temperature.
- __init__(traj: ParticleTrajectory, drU: Callable, dr2U: Callable, skip: float = 0.0, nav: int = 10, ptype: int | None = None, **kwargs) None#
Calculates the configurational temperature.
For more details, see Refs. [1], [2] and [3].
References
- Parameters:
traj (ParticleTrajectory) – Trajectory object with simulation data.
drU (function) – First derivative of the potential energy function of one particle. For example, one can use amep.utils.dr_wca.
dr2U (function) – Second derivative of the potential energy function of one particle. For example, one can use amep.utils.dr2_wca.
skip (float, optional) – Skip this fraction at the beginning of the trajectory. The default is 0.0.
nav (int, optional) – Number of frames to consider for the time average. The default is 10.
ptype (float, optional) – Particle type. The default is None.
**kwargs – Other keyword arguments are forwarded to amep.thermo.Tkin.
Methods
__init__(traj, drU, dr2U[, skip, nav, ptype])Calculates the configurational temperature.
items()keys()The keys to the evaluation object.
save(path[, backup, database, name])Stores the evaluation result in an HDF5 file.
values()Attributes
Time-averaged configurational temperature (averaged over the given number of frames).
Mean configurational temperature for each frame.
Indices of all frames for which the mean configurational temperature has been evaluated.
nameTimes at which the mean configurational temperature is evaluated.
- property avg#
Time-averaged configurational temperature (averaged over the given number of frames).
- Returns:
Time-averaged spatial velocity correlation function.
- Return type:
np.ndarray
- property frames#
Mean configurational temperature for each frame.
- Returns:
Function value for each frame.
- Return type:
np.ndarray
- property indices#
Indices of all frames for which the mean configurational temperature has been evaluated.
- Returns:
Frame indices.
- Return type:
np.ndarray
- keys() list[str]#
The keys to the evaluation object.
Used so Evaluation-objects can be used as dictionaries.
- save(path: str, backup: bool = True, database: bool = False, name: str | None = None) None#
Stores the evaluation result in an HDF5 file.
- Parameters:
path (str) – Path of the ‘.h5’ file in which the data should be stored. If only a directory is given, the filename is chosen as self.name. Raises an error if the given directory does not exist or if the file extension is not ‘.h5’.
backup (bool, optional) – If True, an already existing file is backed up and not overwritten. This keyword is ignored if database=True. The default is True.
database (bool, optional) – If True, the results are appended to the given ‘.h5’ file if it already exists. If False, a new file is created and the old is backed up. If False and the given ‘.h5’ file contains multiple evaluation results, an error is raised. In this case, database has to be set to True. The default is False.
name (str or None, optional) – Name under which the data should be stored in the HDF5 file. If None, self.name is used. The default is None.
- Return type:
None.
- property times#
Times at which the mean configurational temperature is evaluated.
- Returns:
Times at which the function is evaluated.
- Return type:
np.ndarray