leelasd / ligpargen

A repository for tutorials and FAQ's about LigParGen
http://traken.chem.yale.edu/ligpargen/
20 stars 17 forks source link

command line is always looking for .mol, independent of options and crashes if not found #60

Open punkpony opened 4 years ago

punkpony commented 4 years ago

Hi!

I think there is a bug in LigGenPar 2.3 command line

I have installed it as advised, liked BOSS, etc.. when I do a test with smiles I get such output:

❯❯❯ LigParGen -s 'c1ccc(cc1)O' -r PHN -c 0 -o 0
error: unknown option '-i'
Traceback (most recent call last):
  File "/usr/local/bin/LigParGen", line 11, in <module>
    load_entry_point('LigParGen==2.3', 'console_scripts', 'LigParGen')()
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/Converter.py", line 99, in main
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/Converter.py", line 164, in convert
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/CreatZmat.py", line 51, in GenMolRep
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/CreatZmat.py", line 29, in AsitIsZmat
FileNotFoundError: [Errno 2] No such file or directory: 'PHN.mol'

There shouldn't be either'-i' error or the .mol one.

if I instead go and provide .pdb file i still have the .mol problem

❯❯❯ LigParGen -p AOTaa.pdb  -r AOT -c -1 -o 0                                                ✘ 1 
Traceback (most recent call last):
  File "/usr/local/bin/LigParGen", line 11, in <module>
    load_entry_point('LigParGen==2.3', 'console_scripts', 'LigParGen')()
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/Converter.py", line 99, in main
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/Converter.py", line 174, in convert
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/CreatZmat.py", line 51, in GenMolRep
  File "/usr/local/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/CreatZmat.py", line 29, in AsitIsZmat
FileNotFoundError: [Errno 2] No such file or directory: 'AOTaa.mol'
therealchrisneale commented 3 years ago

Not sure how helpful this will be, but here is what I get for a successful build with LigParGen v2.1 (even with that strange smiles string for phenol):

$ LigParGen -s 'c1ccc(cc1)O' -r UNK -c 0 -o 0 -l LBCC converter is activated 1 molecule converted 96 audit log messages MOLECULE HAS A CHARGE of 0 DONE WITH OPENMM DONE WITH Q DONE WITH XPLOR DONE WITH CHARMM/NAMD DONE WITH GROMACS DONE WITH LAMMPS DONE WITH DESMOND

$ LigParGen -h usage: LigParGen [-h] [-r RESNAME] [-s SMILES] [-m MOL] [-p PDB] [-o {0,1,2,3}] [-c {0,-1,1,-2,2}] [-l]

Ligand Parameter Generator Based on 
Jorgensen group's OPLS-AA/CM1A(-LBCC) FF
Created on Mon Feb 15 15:40:05 2016
@author: Leela S. Dodda leela.dodda@yale.edu
@author: William L. Jorgensen Lab 
GsGithub17 commented 2 years ago

I'm also having the same no .mol issue.

LBCC converter is activated

OpenBabel01122221343D

12 12 0 0 0 0 0 0 0 0999 V2000 1.3827 -0.2218 0.0056 C 0 0 0 0 0 0 0 0 0 0 0 0 0.5063 -1.3070 -0.0081 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.8714 -1.0906 -0.0146 C 0 0 0 0 0 0 0 0 0 0 0 0 -1.3732 0.2109 -0.0045 C 0 0 0 0 0 0 0 0 0 0 0 0 -0.4968 1.2960 0.0106 C 0 0 0 0 0 0 0 0 0 0 0 0 0.8810 1.0795 0.0141 C 0 0 0 0 0 0 0 0 0 0 0 0 2.4562 -0.3904 0.0096 H 0 0 0 0 0 0 0 0 0 0 0 0 0.8972 -2.3209 -0.0141 H 0 0 0 0 0 0 0 0 0 0 0 0 -1.5542 -1.9359 -0.0271 H 0 0 0 0 0 0 0 0 0 0 0 0 -2.4466 0.3794 -0.0083 H 0 0 0 0 0 0 0 0 0 0 0 0 -0.8877 2.3100 0.0191 H 0 0 0 0 0 0 0 0 0 0 0 0 1.5638 1.9249 0.0237 H 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 1 6 2 0 0 0 0 1 7 1 0 0 0 0 2 3 2 0 0 0 0 2 8 1 0 0 0 0 3 4 1 0 0 0 0 3 9 1 0 0 0 0 4 5 2 0 0 0 0 4 10 1 0 0 0 0 5 6 1 0 0 0 0 5 11 1 0 0 0 0 6 12 1 0 0 0 0 M END $$$$

*** Open Babel Error in OpenAndSetFormat Cannot open BNZ.mol 1 molecule converted Traceback (most recent call last): File "/home/gemechis/anaconda3/bin/LigParGen", line 33, in sys.exit(load_entry_point('LigParGen==2.3', 'console_scripts', 'LigParGen')()) File "/home/gemechis/anaconda3/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/Converter.py", line 99, in main File "/home/gemechis/anaconda3/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/Converter.py", line 164, in convert File "/home/gemechis/anaconda3/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/CreatZmat.py", line 51, in GenMolRep File "/home/gemechis/anaconda3/lib/python3.8/site-packages/LigParGen-2.3-py3.8.egg/LigParGen/CreatZmat.py", line 29, in AsitIsZmat FileNotFoundError: [Errno 2] No such file or directory: 'BNZ.mol'

any solution for this?