Git Product home page Git Product logo

Comments (16)

tbereau avatar tbereau commented on August 22, 2024

Hi,

Can you try to convert your SDF file to a smiles string? Openbabel will do
that for you. Otherwise I'll have a look next week.

Best,
Tristan
On Fri, Nov 13, 2015 at 17:11 filips [email protected] wrote:

Hi,
auto_martini works fine for an example smiles. But I can't convert any sdf
files. I've tried to use sdf with guanazole (attached) but this results in
errors:

./auto_martini --sdf gua-3D.sdf --mol DUPA --verbose
; ring atoms: [[0, 1, 3, 4, 5]]
; Heavy atoms: N C N N N C N
; [0] -27.8905921889
; [1] -34.1904545745
; [3] -28.3426150603
; [4] -24.8125930713
; [5] -37.4331878925
; [0, 3] -63.2728078673
; [0, 4] -62.3127221936
; [1, 4] -65.7449246813
; [1, 5] -72.926702717
; [3, 5] -67.0298714638
; CG bead: 1
; CG bead: 5
; with energy: -72.926702717
; Max. number of attempts: 4
; Atom partitioning: {0: 0, 1: 0, 2: 0, 3: 0, 4: 1, 5: 1, 6: 1}
Traceback (most recent call last):
File "./auto_martini", line 1203, in
ringAtomsFlat, True)
File "./auto_martini", line 825, in printAtoms
molFrag = genMoleculeSMI(smiFrag)
File "./auto_martini", line 89, in genMoleculeSMI
mol = Chem.MolFromSmiles(args.smi)
TypeError: No registered converter was able to produce a C++ rvalue of type std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > from this Python object of type NoneType

Sample sdf files attached.
sdf files are here in gist:
https://gist.github.com/filipsPL/e1a7be4b989e50a4b10f


Reply to this email directly or view it on GitHub
#3.

from auto_martini.

filipsPL avatar filipsPL commented on August 22, 2024

Thanks,
That would probably be ok. However I would like to preserve 3D structure of the ligand (if it is possible), so sdf structure is a must.

from auto_martini.

tbereau avatar tbereau commented on August 22, 2024

Hi,

I've tested your 2 SDF files on my computer, and there's no error. My guess is that your version of RDKit is too old. Can you check which version you have, and possibly try to update it?

In [1]: from rdkit import rdBase

In [2]: rdBase.rdkitVersion
Out[2]: '2013.09.1'

Best,
Tristan

from auto_martini.

filipsPL avatar filipsPL commented on August 22, 2024

(Un)fortunatelly I've upgraded the RDKit recently:

In [1]: from rdkit import rdBase

In [2]: rdBase.rdkitVersion
Out[2]: '2015.03.1'

Maybe the RDKit is too new ❓

Edit: sorry, I've closed the issue by accident.

from auto_martini.

tbereau avatar tbereau commented on August 22, 2024

I'll try to update on my end to a more recent version of RDKit, but in the
meantime, see if you can create a virtual environment (conda or virtualenv)
with an older RDKit.

Best,
Tristan

On Mon, Nov 16, 2015 at 3:18 PM, filips [email protected] wrote:

Reopened #3 #3.


Reply to this email directly or view it on GitHub
#3 (comment).

from auto_martini.

filipsPL avatar filipsPL commented on August 22, 2024

Ok, I will try it with a virtualenv.

from auto_martini.

filipsPL avatar filipsPL commented on August 22, 2024

I've set up virtualenv with the same rdkit version as your:

>>> from rdkit import rdBase
>>> rdBase.rdkitVersion
'2013.09.1'

and run (venv)fs@card:~/auto_martini$ ./auto_martini --sdf gua-3D.sdf --mol DUPA --verbose This time the error is different than it was before:

; ring atoms: [[0, 1, 3, 4, 5]]
; Heavy atoms: N C N N N C N 
; [0] -27.8905921889
; [1] -34.1904545745
; [3] -28.3426150603
; [4] -24.8125930713
; [5] -37.4331878925
; [0, 3] -63.2728078673
; [0, 4] -62.3127221936
; [1, 4] -65.7449246813
; [1, 5] -72.926702717
; [3, 5] -67.0298714638
; CG bead: 1
; CG bead: 5
;      with energy: -72.926702717
; Max. number of attempts: 4
; Atom partitioning: {0: 0, 1: 0, 2: 0, 3: 0, 4: 1, 5: 1, 6: 1}
Traceback (most recent call last):
  File "./auto_martini", line 1206, in <module>
    ringAtomsFlat, True)
  File "./auto_martini", line 828, in printAtoms
    molFrag = genMoleculeSMI(smiFrag)
  File "./auto_martini", line 92, in genMoleculeSMI
    mol = Chem.MolFromSmiles(args.smi)
Boost.Python.ArgumentError: Python argument types in
    rdkit.Chem.rdmolfiles.MolFromSmiles(NoneType)
did not match C++ signature:
    MolFromSmiles(std::string SMILES, bool sanitize=True, boost::python::dict replacements={})

PS: here is how to setup virtualenv with rdkit

from auto_martini.

tbereau avatar tbereau commented on August 22, 2024

Hmm. What's your boost version?

http://askubuntu.com/questions/147474/how-can-i-find-boost-version

On Tue, Nov 17, 2015 at 1:29 PM, filips [email protected] wrote:

I've set up virtualenv with the same rdkit version as your:

from rdkit import rdBase
rdBase.rdkitVersion
'2013.09.1'

and run (venv)fs@card:~/auto_martini$ ./auto_martini --sdf gua-3D.sdf
--mol DUPA --verbose This time the error is different than it was before:

; ring atoms: [[0, 1, 3, 4, 5]]
; Heavy atoms: N C N N N C N
; [0] -27.8905921889
; [1] -34.1904545745
; [3] -28.3426150603
; [4] -24.8125930713
; [5] -37.4331878925
; [0, 3] -63.2728078673
; [0, 4] -62.3127221936
; [1, 4] -65.7449246813
; [1, 5] -72.926702717
; [3, 5] -67.0298714638
; CG bead: 1
; CG bead: 5
; with energy: -72.926702717
; Max. number of attempts: 4
; Atom partitioning: {0: 0, 1: 0, 2: 0, 3: 0, 4: 1, 5: 1, 6: 1}
Traceback (most recent call last):
File "./auto_martini", line 1206, in
ringAtomsFlat, True)
File "./auto_martini", line 828, in printAtoms
molFrag = genMoleculeSMI(smiFrag)
File "./auto_martini", line 92, in genMoleculeSMI
mol = Chem.MolFromSmiles(args.smi)
Boost.Python.ArgumentError: Python argument types in
rdkit.Chem.rdmolfiles.MolFromSmiles(NoneType)
did not match C++ signature:
MolFromSmiles(std::string SMILES, bool sanitize=True, boost::python::dict replacements={})


Reply to this email directly or view it on GitHub
#3 (comment).

from auto_martini.

filipsPL avatar filipsPL commented on August 22, 2024
dpkg -s libboost-dev | grep 'Version'
Version: 1.48.0.2

from auto_martini.

tbereau avatar tbereau commented on August 22, 2024

I use 1.54. Can you try to upgrade your version of Boost? It looks like the
error is taking place when RDKit tries to use the Boost library. You should
be able to do this in a virtual environment relatively painlessly. I know
conda can install boost easily.

On Tue, Nov 17, 2015 at 1:42 PM, filips [email protected] wrote:

dpkg -s libboost-dev | grep 'Version'
Version: 1.48.0.2


Reply to this email directly or view it on GitHub
#3 (comment).

from auto_martini.

filipsPL avatar filipsPL commented on August 22, 2024

Thanks, now I have boost: 1.55 Version: 1.55.0-1ppa1~precise1 and still the same error:

Traceback (most recent call last):
  File "./auto_martini", line 1206, in <module>
    ringAtomsFlat, True)
  File "./auto_martini", line 828, in printAtoms
    molFrag = genMoleculeSMI(smiFrag)
  File "./auto_martini", line 92, in genMoleculeSMI
    mol = Chem.MolFromSmiles(args.smi)
Boost.Python.ArgumentError: Python argument types in
    rdkit.Chem.rdmolfiles.MolFromSmiles(NoneType)
did not match C++ signature:
    MolFromSmiles(std::string SMILES, bool sanitize=True, boost::python::dict replacements={})

Any further ideas? Meanwhile I will try to install auto_martini on another "fresh" computer and see if it is possible.

from auto_martini.

tbereau avatar tbereau commented on August 22, 2024

Oh ok, then try to change of branch:

git checkout refactor
python auto_martini.py --sdf gua-3D.sdf --mol DUPA --verbose

it's not a release branch yet, but it fixes some problems we have with
reading in some SMILES string within the code.

Cheers,
Tristan

On Tue, Nov 17, 2015 at 4:48 PM, filips [email protected] wrote:

Thanks, now I have boost: 1.55 Version: 1.55.0-1ppa1~precise1 and still
the same error:

Traceback (most recent call last):
File "./auto_martini", line 1206, in
ringAtomsFlat, True)
File "./auto_martini", line 828, in printAtoms
molFrag = genMoleculeSMI(smiFrag)
File "./auto_martini", line 92, in genMoleculeSMI
mol = Chem.MolFromSmiles(args.smi)
Boost.Python.ArgumentError: Python argument types in
rdkit.Chem.rdmolfiles.MolFromSmiles(NoneType)
did not match C++ signature:
MolFromSmiles(std::string SMILES, bool sanitize=True, boost::python::dict replacements={})

Any further ideas? Meanwhile I will try to install auto_martini on another
"fresh" computer and see if it is possible.


Reply to this email directly or view it on GitHub
#3 (comment).

from auto_martini.

filipsPL avatar filipsPL commented on August 22, 2024

Ok, this works fine. Thanks!

from auto_martini.

Alka00 avatar Alka00 commented on August 22, 2024

TypeError: No registered converter was able to produce a C++ rvalue of type std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > from this Python object of type float

from auto_martini.

Alka00 avatar Alka00 commented on August 22, 2024

can u plz tell me why this error is coming

from auto_martini.

tbereau avatar tbereau commented on August 22, 2024

@Alka00 I've never seen this error, but it seems to be linked to RDKit. Maybe have a look at your RDKit installation. If needed, please get in touch with their support.

from auto_martini.

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.