ball icon indicating copy to clipboard operation
ball copied to clipboard

MMFF94 Error in setup() function

Open pbrach opened this issue 9 years ago • 0 comments

I found 2 issues in MMFF94.C that correlate with ring-perception. These came up after fixing the RingPerceptionProcessor and introducing a new exception for cases where we could not correctly generate the SSSR.

In MMFF94.C, Method bool MMFF94::specificSetup(), line 177 and line 227 we call collectRings_() twice. I can find no reason for this, a single call should suffice and I suppose that two calls will lead to wrong behavior. But I am not 100% certain.

Furthermore the routine collectRings_() itself contains a bug in line 665 because here we call calculateSSSR(rings, *getSystem()).

The problem is that a system may contain several unconnected molecules, but the calculateSSSR-method only works on a single connected component. Giving a whole system as input argument we handle all individual AtomContainer/Molecules contained in the system as a single AtomContainer in the RingPerceptionProcessor. This won't work, and certainly did not work before (but at that time we had no exception in the RingPerceptionProcessor pointing the error out).

What we need to do: make sure that we fill the MMFF94 field "rings_" iteratively by appling calculateSSSR() to every connected component of the system. In my opinion we should not only iterate over all molecule-entries within the system, but should also apply a ConnectedComponentProcessor to every individual molecule-entry and use the resulting connectedComponents for ring-finding.

I feel uncomfortable fixing this myself, as I am not too familiar with the forcefields yet and have other stuff on my agenda.

pbrach avatar Jul 24 '15 07:07 pbrach