UCL-CCS / TIES

Topology Superimposition based on joint graph traversal
MIT License
5 stars 1 forks source link

Charges done before disjointed components #251

Closed bieniekmateusz closed 2 years ago

bieniekmateusz commented 3 years ago

There is an issue in the order of operations here. We first check if the net charge is correct and remove further atoms. And only after that we apply the disjointed component rule.

There are two paths:

A middle way for this would be to apply a "semi-disjointed rule" which states that smaller components can be removed only if they are small enough. I think this is the middle ground here. For example, if the molecule has 70 atoms, but the disjointed part removed 6 atoms, then that 6 atoms would never become the major component.

Say that out of 100 atoms, we expect on average 80 to be retained. The rare problem with 1) would be only if the situation was closer to 50/50 (or 40/40 considering that some atoms are already removed). So assume there are two components, and one is larger than the other. How much larger would it have to be for you to feel comfortable with saying that the smaller one can be removed? For this, let us sum the two so that sizes S1 and S2 = S. If we say 1/3, than if S1 or S2 is smaller than 1/3 out of S, than that is a significant difference in size (as the other is 2/3 size). So I will use introduce this rule for now.