State
Overview
Details
- class msibi.state.State(name: str, kT: float, traj_file: str, n_frames: int, sampling_stride: int = 1, alpha0: float = 1.0, alpha_form: str = 'constant', _dir=None)
A single state point used as part of a multistate optimization.
- Parameters:
name (str) – State name used in creating state directory space and output files.
kT ((Union[float, int])) – Unitless heat energy (product of Boltzmann’s constant and temperature).
traj_file (path to a gsd.hoomd file) – The target gsd trajectory associated with this state. This trajectory calcualtes the target distributions used during optimization.
n_frames (int) – The number of frames to use when calculating distributions. When calculating distributions, the last n_frames of the trajectory will be used.
sampling_stride (int, default=1) – The stride step-size used when iterating through the last n_frames of the query simulation trajectory.
alpha0 ((Union[float, int]), default=1.0) – The base alpha value used to scale the weight of this state.
alpha_form (str, optional, default='constant') – Alpha can be a constant number that is applied to the potential at all independent values (x), or it can be a linear function that approaches zero as x approaches x_cut. Available options are ‘constant’ and ‘linear’.
- property n_frames: int
The number of frames used in calculating distributions.
- property sampling_stride: int
The stride step size used to calcualte distributions when iterating through n_frames.
- property alpha0: int | float
State point base weighting value.
- alpha(pot_x_range: ndarray = None, dx: float = None) float | ndarray
State point weighting value, also known as alpha.
Note
This method is called in
msibi.forces.Forcewhen performing the potential update between iterations. To change the alpha value for a state point use thealpha0setter.- Parameters:
pot_x_range (np.ndarray, optional, default=None) – The x value range for the potential being optimized. This is used to generate an array of alpha values, so must be defined when msibi.State.alpha_form is “linear”.