ReliaSolve / cctbx_project

Computational Crystallography Toolbox
https://cctbx.github.io
Other
0 stars 0 forks source link

Look into D vs. H behavior #239

Open russell-taylor opened 1 year ago

russell-taylor commented 1 year ago

H vs D issue -- make sure the Ds don't get changed to Hs during Reduce2 operation.

Also make sure that D's are always treated as Hydrogens, always using element_is_hyrogen() in the code.

We cannot strip out the Deuteriums for neutron structures and replace them; check hydrogenate()

Would Molprobity do this if we stripped them first?

Try 6k8g, a very small neutron structure.

russell-taylor commented 1 year ago

@todo: Hydrogenate is removing the Deuteriums and replacing them with Hydrogens.

@todo: The replacements are in A and B alternates (A is hydrogen and B is deuterium) and the resulting in only a single un-named alternate H.

russell-taylor commented 1 year ago

If we make a command-line argument to leave some hydrogens, then we need to go back to the more-general approach for finding rotatable hydrogens, calling mmtbx.model.model.rotatable_hd_selection() in the outer structure as is done in commit e280c8e20be49698ee5cb84feb0a5227c42c00bc before we switched to our custom _getRotatableSingleHydrogens() method. We should do one or the other depending on the command-line argument -- when Hydrogenate is removing and placing all hyrogens then it will avoid placing them in bad location. As Dorothee points out: "If we allow the user to keep existing H atoms, then you may encounter any scenario. Hydrogenate won't check the input. It will either place new ones or keep the existing ones. I plan to allow a selection, i.e., keep H in one selection and (re)place them in the remaining part. You may want to double check when there is a "split" of alternates, f.ex. a SER with H and D on the oxygen, or a simple H with the rest of the residue split (such things occur in deposited files)."