ReliaSolve / Molprobity2

0 stars 0 forks source link

annularDots code in Reduce should be for overlap cases (including hydrogen bonds) rather than non-overlap cases #105

Closed russell-taylor closed 3 years ago

russell-taylor commented 3 years ago

The probe code has this for all overlap cases, but Reduce has it only for non-overlapping cases.

This means that we never get a score for non-overlapping cases.

This also means that we're not limiting things the way we expect to when overlaps or hydrogen bonds are found.

russell-taylor commented 3 years ago

Not so... the Probe code is excluding when overlaptype == 0 EXCEPT when the dots2srcCenter <= kissEdge2bullsEye and Reduce code is including when overlapType == 0 and annularDots...

russell-taylor commented 3 years ago

So the both Probe and Reduce are testing this in the case when we don't have overlap, but it seems like they should be testing it when we do have overlap. But hold on... they should be testing it for a DOT that does not overlap, which is what they are doing. The atoms will overlap, but the dot will not. Okay, this makes sense in both cases.

russell-taylor commented 3 years ago

However, in the case where the entire atom is not overlapping, we still want to count the values from close-contact dots to give a better fit for atoms that are nearly touching.

Probe has a command-line argument to turn on counting weak hydrogen bonds (default off). If it is on, then the overlap type is set to 2 and counting an external dot as a hydrogen bond. Other atom near touches in Probe (and all in Reduce) seem to ignore these as annular dots.

Jane reports that Probe does show contact dots and also count them towards the score, but she is not 100% certain that they are counted when the atoms do not overlap. Feed it a test case to verify.

russell-taylor commented 3 years ago

Hook into saveDot() and see if we can figure out which ones could contribute to a score.

russell-taylor commented 3 years ago

The code in Probe that is using the dot2srcCenter() and kissEdge2bullsEye() functions is passing all of the dots for a Hydrogen at some distance from a Nitrogen when they are not overlapping. This is for non-overlapping atoms with LimitDots set to true. The numbers are all within bounds that would be passed.

russell-taylor commented 3 years ago

When we get closer such that some dots overlap, some of the non-overlapping dots pass and others do not pass, so it seems like this function is working in both partial-overlap and non-overlap cases in Probe.

russell-taylor commented 3 years ago

The dot2srcCenter function is returning much larger values for the new Probe code (1.3-1.5 rather than 0.1-0.5) than for the original code for similar radii and distances.

russell-taylor commented 3 years ago

For a radius-1 atom, it is surprising that the distances from a dot to the source center is larger than 1. This would imply that the dot is on the back side of the atom, which should only happen during contact.

russell-taylor commented 3 years ago

The problem appears not to be in the annular-dots code -- there are no dots in our test case that are being considered by it.

russell-taylor commented 3 years ago

The bug was in the testing code, not in the calculations.