schrodinger.application.desmond.measurement module¶
- class schrodinger.application.desmond.measurement.Measurement(value: float, uncertainty: float = nan)¶
Bases:
object
Basic method for uncertainty propagation: Say we have a few measurements: x1, x2, x3, …, and they each have an uncertainty: d1, d2, d3, …, respectively. Now we have a function: f(x1, x2, x3, … ), we want to get the value of this function with given measurements x1, x2, x3, and also the uncertainty of the result of f. A way to do this is the following:
We need to get the contribution to the uncertainty of f result due to each measurement: fd1, fd2, fd3, … This can be given by the following equations:
fd1 = df / dx1 * d1 fd2 = df / dx2 * d2 fd3 = df / dx3 * d3 ...
where
df / dx1
is a partial derivative of f with respect to x1.With
fd1, fd2, fd3, ...
, we can get the uncertainty of f using this equation:fd = math.sqrt( fd1 * fd1 + fd2 * fd2 + fd3 * fd3 + ... )
- __init__(value: float, uncertainty: float = nan)¶
- to_string(num_digits: int) str ¶
Convert
Measurement
to string with givennum_digits
decimal places
- classmethod from_string(s: str) schrodinger.application.desmond.measurement.Measurement ¶
Convert string (e.g: “5.0+-0.3”) to
Measurement
- schrodinger.application.desmond.measurement.string2measurement(s: str) schrodinger.application.desmond.measurement.Measurement ¶
Convert string (e.g: “5.0+-0.3”) to
Measurement
This method is deprecated in favor of
Measurement.from_string