Giter Club home page Giter Club logo

Comments (3)

mcs07 avatar mcs07 commented on August 22, 2024

Thanks for the bug report.

This should now be fixed - there was a bug in the patterns that are used to decide whether the ionised atom should be changed, resulting in an infinite loop.

Run pip install -U molvs to update to the latest version.

from molvs.

adlvdl avatar adlvdl commented on August 22, 2024

Yes, with the update the example now completes. However a new molecule (ZINC000060321958) that previously finished now is giving problems. Like before I paste the example and traceback.

smi="C[N+]1=C[CH-]N(C(=N)N)/C1=C/N+[O-]"
s = molvs.Standardizer()
mol=Chem.MolFromSmiles(smi)
mol = s.standardize(mol)


StandardizeError Traceback (most recent call last)
in ()
2 s = molvs.Standardizer()
3 mol=Chem.MolFromSmiles(smi)
----> 4 mol = s.standardize(mol)
5 print(Chem.MolToSmiles(mol, True))

C:\Software\Miniconda\lib\site-packages\molvs\standardize.py in standardize(self, mol)
97 mol = self.disconnect_metals(mol)
98 mol = self.normalize(mol)
---> 99 mol = self.reionize(mol)
100 Chem.AssignStereochemistry(mol, force=True, cleanIt=True)
101 # TODO: Check this removes symmetric stereocenters

C:\Software\Miniconda\lib\site-packages\molvs\charge.py in call(self, mol)
153 def call(self, mol):
154 """Calling a Reionizer instance like a function is the same as calling its reionize(mol) method."""
--> 155 return self.reionize(mol)
156
157 def reionize(self, mol):

C:\Software\Miniconda\lib\site-packages\molvs\charge.py in reionize(self, mol)
200 if ioccur and poccur and ppos < ipos:
201 if poccur[-1] == ioccur[-1]:
--> 202 raise StandardizeError('Reionizer entered an infinite loop! Please report as a MolVS bug.')
203 log.info('Moved proton from %s to %s', self.acid_base_pairs[ppos].name, self.acid_base_pairs[ipos].name)
204 patom = mol.GetAtomWithIdx(poccur[-1])

StandardizeError: Reionizer entered an infinite loop! Please report as a MolVS bug.

from molvs.

mcs07 avatar mcs07 commented on August 22, 2024

Sorry for dropping this - I hope this is now fixed with v0.0.9.

Let me know if there are still any problems.

from molvs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.