auto_martini
auto_martini copied to clipboard
Problem in 'smi2alogps %s" % smiFrag'
Hi, I wish to use auto-martini for getting CG file for my drug. I tried to use the example given here. However, I am getting following error-
python auto_martini --smi "N1=C(N)N python auto_martini --smi "N1=C(N)NN=C1N" --mol GUA
Traceback (most recent call last):
File "auto_martini", line 1204, in
Also, when I was trying to run this script for my molecule, I received this error - Error. Exhaustive enumeration can't handle large molecules. Number of heavy atoms: 41
Please help me in this regard.
Could you check whether your BeautifulSoup package is working correctly? Try adding the following statement at line 677:
print soup
(It should right beneath soup = doc.prettify()
As for the enumeration issue, auto_martini can't handle large molecules at the moment. That's due to the current exhaustive enumeration of bead mappings--preventing it from working with large molecules. One alternative you have is to break up your molecules into fragments, coarse-grain those, and then connect them yourself.
Best, Tristan
Any update? Something else that came up is the requirement to have the 'lxml' package. Could you check whether the command
import lxml
returns without an error? If not, try installing it (using pip or equivalent).
Best, Tristan
Respected sir,
I added 'print soup' at line 677 below soup = doc.prettify() as you had suggested. Also, lxml was imported. now I am receiving following error
python auto_martini --sdf gua.sdf --mol gua --verbose
; ring atoms: [[0, 2, 6, 1, 5]]
; Heavy atoms: N N N N N C C
; [0] -43.5137590647
; [1] -48.8876118299
; [2] -43.5139391855
; [5] -45.7019823874
; [6] -45.7018655559
; [0, 1] -87.3909378371
; [0, 6] -87.0065915631
; [1, 2] -87.3911080548
; [2, 5] -87.0068963568
; [5, 6] -89.1948049826
; CG bead: 5
; CG bead: 6
; with energy: -89.1948049826
; Max. number of attempts: 5
; Atom partitioning: {0: 0, 1: 0, 2: 1, 3: 0, 4: 1, 5: 0, 6: 1}
Traceback (most recent call last):
File "auto_martini", line 1205, in
Sincerely, Sneha
On Thu, Feb 9, 2017 at 1:10 PM, Tristan Bereau [email protected] wrote:
Any update? Something else that came up is the requirement to have the 'lxml' package. Could you check whether the command
import lxml
returns without an error? If not, try installing it (using pip or equivalent).
Best, Tristan
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tbereau/auto_martini/issues/7#issuecomment-278569002, or mute the thread https://github.com/notifications/unsubscribe-auth/AYWKF-85ruMdKo1YUI1cwKxmtMAYJ0Qyks5rasLdgaJpZM4L2TVN .
Could you try with the refactor
branch? Simply type
git checkout refactor
and then running the code is slightly different:
python auto_martini.py --sdf gua.sdf --mol gua --verbose
Also, I typically run the code with smiles string rather than sdf files. I'd recommend you first convert your sdf file to a smiles string (e.g., using OpenBabel) and then run the code from the smiles string (as you had it in your initial post).
Best, Tristan
Respected sir,
python auto_martini.py --smi "1nc(nc1N)N" --mol gua --verbose
The sanitize.log file says
[11:20:22] SMILES Parse Error: syntax error for input: '1nc(nc1N)N'
Traceback (most recent call last):
File "auto_martini.py", line 1309, in
Sincerely, Sneha
On Mon, Feb 13, 2017 at 11:11 AM, sneha dixit [email protected] wrote:
Respected sir,
python auto_martini.py --smi "N1=C(N)NN=C1N" --mol gua --verbose The sanitize.log file says
[11:10:43] Can't kekulize mol. Unkekulized atoms: 1 2 3 4 5
WARNING:main:Bad smiles format Nc1ncnn1 found [11:10:43] Can't kekulize mol. Unkekulized atoms: 1 2 3 4 5
WARNING:main:Fixed smiles format to Nc1nnc[nH]1 WARNING:main:Error with BeautifulSoup constructor
sincerely, Sneha
On Fri, Feb 10, 2017 at 1:41 PM, Tristan Bereau [email protected] wrote:
Could you try with the refactor branch? Simply type
git checkout refactor
and then running the code is slightly different:
python auto_martini.py --sdf gua.sdf --mol gua --verbose
Also, I typically run the code with smiles string rather than sdf files. I'd recommend you first convert your sdf file to a smiles string (e.g., using OpenBabel) and then run the code from the smiles string (as you had it in your initial post).
Best, Tristan
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tbereau/auto_martini/issues/7#issuecomment-278882917, or mute the thread https://github.com/notifications/unsubscribe-auth/AYWKFz2N-YHjb76tr4Uu7oPYMGyG6BN5ks5rbBuqgaJpZM4L2TVN .
Dear Sneha,
I don't think this is a valide smiles string. Try with "CCCC" instead.
Best, Tristan
Can't kekulize mol. Unkekulized atoms: 1 2 3 4 5
WARNING:main:Bad smiles format Nc1ncnn1 found [01:52:50] Can't kekulize mol. Unkekulized atoms: 1 2 3 4 5
WARNING:main:Fixed smiles format to Nc1nnc[nH]1 WARNING:main:Error with BeautifulSoup constructor
On Mon, Feb 13, 2017 at 8:53 PM, Tristan Bereau [email protected] wrote:
Dear Sneha,
I don't think this is a valide smiles string. Try with "CCCC" instead.
Best, Tristan
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tbereau/auto_martini/issues/7#issuecomment-279422533, or mute the thread https://github.com/notifications/unsubscribe-auth/AYWKF3FJmOZu_FfnGJeN9VFmEvWtmUiIks5rcHVXgaJpZM4L2TVN .
Still using the problematic smiles, right? Looks like you're getting a similar output. On Mon, Feb 13, 2017 at 14:24 Snehadixit1994 [email protected] wrote:
Can't kekulize mol. Unkekulized atoms: 1 2 3 4 5
WARNING:main:Bad smiles format Nc1ncnn1 found [01:52:50] Can't kekulize mol. Unkekulized atoms: 1 2 3 4 5
WARNING:main:Fixed smiles format to Nc1nnc[nH]1 WARNING:main:Error with BeautifulSoup constructor
On Mon, Feb 13, 2017 at 8:53 PM, Tristan Bereau [email protected] wrote:
Dear Sneha,
I don't think this is a valide smiles string. Try with "CCCC" instead.
Best, Tristan
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <https://github.com/tbereau/auto_martini/issues/7#issuecomment-279422533 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AYWKF3FJmOZu_FfnGJeN9VFmEvWtmUiIks5rcHVXgaJpZM4L2TVN
.
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/tbereau/auto_martini/issues/7#issuecomment-279511198, or mute the thread https://github.com/notifications/unsubscribe-auth/AAxNMkoewEdnuokptodv61AK-a2WKkPrks5rcLwEgaJpZM4L2TVN .
Hi I run the following command: python auto-martini --smi "CCCC" --mol NBUT I am getting the following error-
ALOGPS can't predict fragment: CCCC
Traceback (most recent call last):
File "auto-martini.py", line 1227, in
ringAtomsFlat, True)
File "auto-martini.py", line 858, in printAtoms
raise Exception("Problem in smi2alogps %s" % smiFrag)
Exception: Problem in smi2alogps CCCC
python2.7: /usr/include/boost/thread/pthread/mutex.hpp:111: boost::mutex::~mutex(): Assertion `!res' failed.
Aborted (core dumped)
I added print(soup) and imported lxml as suggested but still getting same error. Please suggest me. Thanks in advance
Hi anuktratig,
Try running this python code:
from bs4 import BeautifulSoup
import lxml
import requests
session = requests.session()
req = session.get('http://vcclab.org/web/alogps/calc?SMILES=CCCC')
doc = BeautifulSoup(req.content, "lxml")
soup = doc.prettify()
print soup
You should be getting this:
<html>
<body>
mol_N logP logS SMILES
<br/>
mol_1 2.81 -1.91 CCCC
<br/>
</body>
</html>
Is that the case?
Best, Tristan
Dear Tristan
I run the pyhton code as suggested. This is what I am getting.
Does running the code in the browser yield the same?
Sorry, I meant running the URL.
Yeah it is working on the browser
Thanks
What about from the command line using wget
?
All packages are working fine.
When i am running the command, it is showing invalid syntax.
I am running the following command
auto-martini --smi "CCCC" --mol BUT
Looks like you're running this from a Python terminal. Run auto-martini from the command line instead.
Now this error is showing
I can't reproduce your error. What branch/commit are you on? Also, did you rename the name of the script? That looks different.
Hi change auto-martini to auto_martini.