ConstantVolumeHeatCapacity¶
- class mdhelper.analysis.thermodynamics.ConstantVolumeHeatCapacity(log_file: str | Path = None, log_format: str = None, *, energies: ndarray[float] | Quantity | Quantity = None, temperature: float | Quantity | Quantity = None, reduced: bool = False, sep: str = ',')[source]¶
- Bases: - object- A serial implementation to caluclate the constant-volume heat capacity \(C_V\) for a canonical (\(NVT\)) system. - The constant-volume heat capacity is defined as \[C_V=\frac{\langle U^2\rangle-\langle U\rangle^2} {k_\mathrm{B}T^2}\]- where \(U\) is the total potential energy of the system, \(\langle\cdot\rangle\) denotes the ensemble average, \(k_\mathrm{B}\) is the Boltzmann constant, and \(T\) is the system temperature. - Parameters:
- log_filestr or pathlib.Path, optional
- Log file generated by the simulation. If not provided, the potential energies must be provided directly in energy. 
- log_formatstr, optional
- Format of the log file. If not provided, the format will be determined automatically (if possible). - Valid values: - "lammps",- "openmm".
- energiesnumpy.ndarray or pint.Quantity, optional
- Potential energies. If not provided, the log file must be provided in log_file. 
- temperaturefloat, openmm.unit.Quantity, or pint.Quantity, optional
- System temperature. If not provided, the averaged temperature from the log file (if available) is used. 
- reducedbool, keyword-only, default: False
- Specifies whether the data is in reduced units. 
- sepstr, keyword-only, default: ","
- Delimiter for OpenMM log files. 
 
- Attributes:
- results.unitsdict
- Reference units for the results. For example, to get the reference units for - results.temperature, call- results.units["results.temperature"].
- results.energiesnumpy.ndarray
- Total (kinetic + potential) energy values. - Reference unit: \(\mathrm{kcal/mol}\) or \(\mathrm{kJ/mol}\). 
- results.temperaturefloat
- System temperature. - Reference unit: \(\mathrm{K}\). 
- results.heat_capacityfloat
- Constant-volume heat capacity. - Reference unit: \(\mathrm{kcal/K}\) or \(\mathrm{kJ/K}\). 
 
 - Methods - Performs the calculation. - run(start: int = None, stop: int = None, step: int = None, frames: ndarray[int] | slice = None) None[source]¶
- Performs the calculation. - Parameters:
- startint, optional
- Starting frame for analysis. 
- stopint, optional
- Ending frame for analysis. 
- stepint, optional
- Number of frames to skip between each analyzed frame. 
- framesslice or array-like, optional
- Index or logical array of the desired trajectory frames. 
- verbosebool, optional
- Determines whether detailed progress is shown. 
- **kwargs
- Additional keyword arguments to pass to - MDAnalysis.lib.log.ProgressBar.
 
- Returns:
- selfConstantVolumeHeatCapacity
- Analysis object with results.