Conformer Generation might fail within EmbedAlignScore() leading to ValueError: ```Bad Conformer Id``` · Issue #34 · hesther/espsim · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue Description:
Within the EmbedAlignScore(), the function GetCrippenO3A() with molecules containing multiple conformers, encounters a 'ValueError: Bad Conformer Id error.' This error occurs inconsistently, meaning that some molecules result in this error and some won't. The error can be mitigated by changing the random seed or the number of conformers.
Current Workaround:
I implemented a simple try-except statement to catch this error in two nested loops where GetCrippenO3A() is called:
foriinrange(refNumConfs):
forjinrange(prbNumConfs):
try:
alignment=rdMolAlign.GetCrippenO3A(prbMol, refMol, prbCrippen, refCrippen, j, i)
alignment.Align()
shape=GetShapeSim(prbMol,refMol,j,i)
ifshape>shapeSim:
shapeSim=shapeprbBestConf=jrefBestConf=iexceptValueErrorase:
print(f"Failed for Conformers {i} and {j}.")
Suggested Improvement:
While the current try-except workaround prevents the program from crashing, it means that fewer conformer pairs than specified are actually tested. A more robust solution would be to handle this during conformer generation, ensuring that all generated conformer IDs are valid before the alignment step. This would maintain the expected number of conformer comparisons and potentially improve the reliability of the results.
The text was updated successfully, but these errors were encountered:
Issue Description:
Within the
EmbedAlignScore()
, the functionGetCrippenO3A()
with molecules containing multiple conformers, encounters a'ValueError: Bad Conformer Id error.'
This error occurs inconsistently, meaning that some molecules result in this error and some won't. The error can be mitigated by changing the random seed or the number of conformers.Current Workaround:
I implemented a simple try-except statement to catch this error in two nested loops where GetCrippenO3A() is called:
And similarly in another section:
Suggested Improvement:
While the current try-except workaround prevents the program from crashing, it means that fewer conformer pairs than specified are actually tested. A more robust solution would be to handle this during conformer generation, ensuring that all generated conformer IDs are valid before the alignment step. This would maintain the expected number of conformer comparisons and potentially improve the reliability of the results.
The text was updated successfully, but these errors were encountered: