-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package rdkit and smile format #16
Comments
Hi, the code you're referring to seems to raise an exception upon loading Best, |
Hi, |
Boost.Python.ArgumentError Traceback (most recent call last) ArgumentError: Python argument types in |
Hi, It seems that auto_martini is having some trouble with your smiles string. If I use the string: C#CCC#CC=C=C(C)C#CC#C I am able to get a result. Because you have so many files, rather than hand-tune each smiles string, I'd recommend using the refactor branch, which is able to handle more complex smiles strings like the one you had input above. Simply type
The refactor branch also has two more significant changes to the code: a slightly larger value for the lonely atom penalty and the removal of the additivity check for molecules mapping to single beads only. Best, |
Hi Kiran, |
Hi, I am essentially saying that you could try to use an updated version of the code, the refactor branch. In the folder containing auto-martini you should be able to type the above command to get this version. If this does not work, it may be because you downloaded an archive of the code instead of cloning it using git. In this case, I suggest you type the following into your terminal command line:
The "last instructions" from my earlier post were just detailing the changes made in the newer version. Best, |
Hi, Boost.Python.Traceback(most recent call last): File "C:\Users\meriem hanine\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3267, in run_code File "", line 1, in File "C:\git\auto_martini\auto_martini.py", line 35, in File "C:\git\auto_martini\sanifix4.py", line 277 this problem is related with version? |
Hi, I'd recommend opening the sanifix4.py file and adding parentheses to the print command on line 277 so that it looks like the following:
If you still have problems, this might be a specific issue with the version of python that you are using. The auto_martini code is meant to be used with Python 2.7.X. Best, |
hello,
someone can help me please.
I am still new in the use of python
Boost.Python.ArgumentError: Python argument types in
rdkit.Chem.rdmolops.AddHs(NoneType)
did not match C++ signature:
AddHs(RDKit::ROMol mol, bool explicitOnly=False, bool addCoords=False, boost::python::api::object onlyOnAtoms=None)
the code does not work for this file:
[CH]C(=C=CC#C[C]C#C)C#CC#C 19 0 -122.66159367965076 -6.4558733515605669
this is the code:
import rdkit
import rdkit.Chem
from rdkit.Chem import AllChem
from rdkit.Chem import Draw
with open("./ringinfo.txt","w") as f1:
for i in range(1,259 ):
fn = "./SMI/{}.smi".format(i)
smiles = open(fn, "r").read().split()[0]
mol = rdkit.Chem.AddHs(rdkit.Chem.MolFromSmiles(smiles))
rings = rdkit.Chem.GetSymmSSSR(mol)
print(len(rings), file=f1)
suppl = rdkit.Chem.SDMolSupplier('./SDF/{}.sdf'.format(i))
ms = [x for x in suppl if x is not None]
p = rdkit.Chem.MolFromSmiles(smiles)
subms = [x for x in ms if x.HasSubstructMatch(p)]
AllChem.Compute2DCoords(p)
for m in subms: AllChem.GenerateDepictionMatching2DStructure(m,p)
img=Draw.MolsToGridImage(subms,molsPerRow=1,subImgSize=(600,600))
img.save('./FIG/{}.png'.format(i))
The text was updated successfully, but these errors were encountered: