NormalVectorScore#
- class NormalVectorScore(target_coordinates, template_coordinates, target_weights, template_weights, template_mask_coordinates=None, target_mask_coordinates=None, negate_score=True, **kwargs)[source]#
Bases:
_MatchCoordinatesToCoordinates
The Normal Vector Score (NVS) between the target’s \(f\) and the template \(g\)’s normal vectors is calculated as:
\[\text{d(f,g)} = \frac{1}{N} \sum_{i=1}^{N} \frac{ {\vec{f}_i} \cdot {\vec{g}_i} }{ ||\vec{f}_i|| \, ||\vec{g}_i|| }\]- Parameters:
- targetNDArray
A d-dimensional target to match the template coordinate set to.
- template_coordinatesNDArray
Template coordinate array with shape (d,n).
- template_weightsNDArray
Template weight array with shape (n,).
- template_mask_coordinatesNDArray, optional
Template mask coordinates with shape (d,n).
- target_maskNDArray, optional
A d-dimensional mask to be applied to the target.
- negate_scorebool, optional
Whether the final score should be multiplied by negative one. Default is True.
- return_gradientbool, optional
Invoking __call_ returns a tuple of score and parameter gradient. Default is False.
- **kwargsDict, optional
Keyword arguments propagated to downstream functions.
References
[1]Daven Vasishtan and Maya Topf, “Scoring functions for cryoEM density fitting”, Journal of Structural Biology, vol. 174, no. 2, pp. 333–343, 2011. DOI: https://doi.org/10.1016/j.jsb.2011.01.012
Methods
NormalVectorScore.rotate_array
(arr, ...[, ...])Compute the matching score for the given transformation parameters.
Computes the score after a given rotation.
Computes the score after a given translation.