Closed russell-taylor closed 2 years ago
The preference energy for a given orientation is available for flips as a negative term on the flipped orientation. We'll need to take this into account on whatever code decides to mark the flip as uncertain. I've asked Jane whether we need this clash/uncertain distinction in the output; it so, we'll need to compute it specially.
(done) Convert from coarse/fine pair to description of the state inside each Mover type and add this to the resulting string to make it more useful for viewers. We'll still print the coarse/fine so that we can parse it back in to set the state for ones that the user wants to lock down.
(done) AmideFlip rather than NH2Flip and His rather than Histidine. (rejected) Flipped and Unflipped --> Flip and Keep. The makes it say "Keep HD1 removed", which is confusing. (done) Add degrees (Jane asked for the degree mark, but I don't know that this special character works on all sets). Try code 176. (done) Change "REPORT:" to "Mover:" or "MOV:" to make the copy/pasted control file easier to understand.
(done) Final reported angles need to be with respect to the defined dihedrals (e.g. CA-CB-OG-HG for Ser). This is determined with respect to the convention for selecting atoms to use when dealing with dihedrals. Jane is looking for a reference for that convention. Some are unambiguous. For ambiguous ones, you pick the atom whose number is smallest at each branch. For the same numbers, you pick the atom whose atomic number is larger.
One way to make this happen is to store an offset from the original location to the 0 location of the dihedral calculation for the given Mover. We can add or subtract this offset in the description function. We're going to need to always place the first hydrogen with respect a conventional dihedral calculation (https://github.com/ReliaSolve/cctbx_project/issues/158), so this will just mean recording extra info at the same time we already have to walk the molecule.
(done) List cliques in decreasing order of size, with a header line that tells the initial and final score for all elements in the clique and then lists the singletons within that clique. Then list all singletons after all clique reports.
(done) Initial score for unflipped Histidine does not match the best score when the best is unflipped; for one thing we get a preference energy difference at 0 and for another, we get a larger difference. The same thing happens for some (but not all) amide flips. (Check and see if this is due to cliques in the output that were not marked.)
The large score differences are for HisFlips that are part of cliques, so it makes sense that they would differ. This is also true for AmideFlips; all of the changed ones are either in cliques or flipped.
(done) The final location for the HisFlips has only a single Hydrogen added, which is preferred to the 0th coarse location; so "initial location" is perhaps a bit of a misnomer. We may want to match the hydrogen state when computing the initial state for Histidine flips. No, we'll just deal with the fact that it is different.
(done) Remove the coarse and fine state reports and make it clear that the inside parentheses is the final state
(done) Report which Hydrogens are present on Histidines rather than which are removed
(done) Put the final state at the end of the record so the field length can vary
(done) Consider checking ALL poses for flippers to see if they all clash and if the point spread is insufficient. Then put back into the final pose.
Just checking the two flips states that have the same protenation.
(done) Make sure we're fixing up the states after we adjust them for reporting purposes. We probably want a function for this that we call whenever we do it.
Don't need the early procedure descriptions for analysis, just the final line describing each Mover's final state and the difference in score from the initial state.