overlap with nma(mass=TRUE)
... does not sum to 1:
tail(overlap(modes, xyz.diff, nmodes=9999)$overlap.cum)
since fit.xyz is not mass weighted.
Compare to:
modes <- nma(pdb, mass=FALSE)
tail(overlap(modes, xyz.diff, nmodes=9999)$overlap.cum)
Solution can be to provide mass weighting in fit.xyz, or issue a warning in overlap (and also rmsip?).
Comments (5)
-
-
reporter Agree that we can leave fix.xyz alone for now, but with time we could consider it. I'll see how I can update the rmsip and overlap functions. perhaps just noting in the .Rd files is enough...?
We can calculate residue mass for any given set of atoms with atom2mass. i.e.:
atom2mass(c("C", "O", "CA", "NH1")) [1] 12.01 16.00 12.01 14.01 atom2mass(pdb, inds=atom.select(pdb, resno=10)) Build selection from input components segid chain resno resid eleno elety Stest "" "" "10" "" "" "" Natom "3888" "3888" "8" "3888" "3888" "3888" * Selected a total of: 8 intersecting atoms * [1] 14.01 12.01 12.01 16.00 12.01 12.01 16.00 14.01
There is also a grpby argument for the purpose of extracting residue masses from atom2mass. However, aa2mass provides amino acid masses including the weights of the hydrogens -- which atom2mass would not pick up unless they are present in the structure.
-
- changed status to resolved
Resolved. Pay attention to warnings!
-
reporter - marked as enhancement
Can we have this in the to-do list? It's in principle not resolved - only ignored :) I've changed it to 'enhanchement' .
-
We can mark it as a known bug if you like. The mass weighted fitting is certainly an 'enhancement feature' though.
We could also implement TMalign at some point...
- Log in to comment
I think the warning route would be best as fit.xyz() is already bloated and quite central to many other workflows that are best left undisturbed until we have a robust and useful testsuite.
On a somewhat related note, assigning mass to things not included in aa2mass() is a weak point that I have been thinking about. The way aa321() goes about this is to use a wild card "X" that is setup in substitution matrices to score well with any other residue.
If we have a missing residue definition in aa2mass() could we have an option that attempt to calculate the mass based on a corresponding pdb structure?