pca.project() option to fit to mean

Issue #18 resolved
Barry Grant created an issue

Note from David Sept: "In projecting different structures/simulations on to a common basis set, we realized that the reference to which our structures are fit matters (in some cases a lot), and as such everything should really be fit to the mean coming from the pca analysis. I think this is actually a fairly important point and maybe this could be added as an option? Thoughts?"

-- reply Yes, if things are moving around the reference for superposition and subsequent projection can often be vitally important.

This is what motivated the notion of the invariant "core" structure subset, which is what we recommend folks use for superposition and projection.

The core structure (returned from the "core.find() function) is basically the subset of coordinate positions (usually obtained from collections of crystal structures but occasionally a subset of trajectory frames) that are largely invariant and that can be most sensibly used for fitting (i.e. the fitting results largely don't change if you use any subset of these positions). Using the average or any individual example of these core positions will also not matter.

I will also note that the mean structure is returned from pca.xyz() and that we can add this to fit.xyz() or pca.project() as an option if the assumed pre-fitting has not beed done.

Comments (2)

  1. Barry Grant reporter

    Could add a "fit=TRUE" and "..." option to pac.project() function.

    If fit=TRUE then the input "data" would first be passed to fit.lsq() along with the $mean coords from input "pca" object and input "..." arguments (where "..." could be fitting indices etc.)

  2. Log in to comment