Isra3l / ligpargen

MIT License
54 stars 20 forks source link

CM1A-LBCC does not work #1

Closed librahoo closed 2 years ago

librahoo commented 2 years ago

I tried with BOSS 4.9 and ligpargen compiled with conda python3.7, the charge generation algorithm only works for CM1A but not CM1A-LBCC on my system (Ubuntu 18.04), below are the comparison and error output:

ligpargen -s 'c1ccc(cc1)O' -sb 'c1ccccc1' -n phenol_benzene -o 0 -cgen CM1A -cb 0 -ob 1 -cgenb CM1A
LigParGen finished succesfully!

ligpargen -s 'c1ccc(cc1)O' -sb 'c1ccccc1' -n phenol_benzene -o 0 -cgen CM1A -cb 0 -ob 1 -cgenb CM1A-LBCC
Traceback (most recent call last):
File "/data/soft/anaconda3/envs/py37/bin/ligpargen", line 33, in
sys.exit(load_entry_point('LigPargen', 'console_scripts', 'ligpargen')())
File "/data/soft/ligpargen/ligpargen/ligpargen.py", line 494, in main
molname=args.molname, workdir= args.path, debug= args.debug)
File "", line 17, in init
File "/data/soft/ligpargen/ligpargen/ligpargen.py", line 222, in post_init
moleculeB = Molecule.fromBOSS(zmatNameB, outFileB, pdbFileB, moleculeB.shiftX, moleculeB.shiftY, moleculeB.shiftZ)
File "/data/soft/ligpargen/ligpargen/topology/Molecule.py", line 141, in fromBOSS
atoms, numberOfStructuralDummyAtoms = cls._getAtoms(cls, zmatData, pdbfile)
File "/data/soft/ligpargen/ligpargen/topology/Molecule.py", line 460, in _getAtoms
atomsLines = re.search(r'BOSS(.*?)Geometry', zmatData, re.DOTALL).group().splitlines()[1:-1]
AttributeError: 'NoneType' object has no attribute 'group'

Any ideas?

quantaosun commented 2 years ago

I probably have met the same issue. Then I start over again, and now I got "Open babel" issue, ERROR! Open Babel is not installed on your work station. But I have installed obabel already, anyone help ?

WuLingyu commented 2 years ago

try install openbabel by using "conda install -c openbabel openbabel"

punkpony commented 2 years ago

I probably have met the same issue. Then I start over again, and now I got "Open babel" issue, ERROR! Open Babel is not installed on your work station. But I have installed obabel already, anyone help ?

same here. openbabel is installed with conda install -c conda-forge openbabel

I can run tests OK python -m unittest test_ligpargen/test_ligpargen.py

punkpony commented 2 years ago

try install openbabel by using "conda install -c openbabel openbabel"

having done this, got to the first error:

 ❯❯❯ ligpargen -s "c1ccc(cc1)O"                                                               ✘ 1 
Traceback (most recent call last):
  File "/Users/valentina/opt/anaconda3/envs/py37/bin/ligpargen", line 33, in <module>
    sys.exit(load_entry_point('LigPargen', 'console_scripts', 'ligpargen')())
  File "/Users/valentina/Desktop/codes/LigParGen/ligpargen/ligpargen/ligpargen.py", line 494, in main
    molname=args.molname, workdir= args.path, debug= args.debug)
  File "<string>", line 17, in __init__
  File "/Users/valentina/Desktop/codes/LigParGen/ligpargen/ligpargen/ligpargen.py", line 190, in __post_init__
    self.workdir, self.debug)
  File "/Users/valentina/Desktop/codes/LigParGen/ligpargen/ligpargen/tools/boss.py", line 208, in run
    shutil.copyfile('plt.pdb', pdbFile)
  File "/Users/valentina/opt/anaconda3/envs/py37/lib/python3.7/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: 'plt.pdb'

and now I cannot run tests python -m unittest test_ligpargen/test_ligpargen.py

getting error

E
======================================================================
ERROR: test_ligpargen/test_ligpargen (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_ligpargen/test_ligpargen
Traceback (most recent call last):
  File "/Users/valentina/opt/anaconda3/envs/py37/lib/python3.7/unittest/loader.py", line 154, in loadTestsFromName
    module = __import__(module_name)
ModuleNotFoundError: No module named 'test_ligpargen/test_ligpargen'

----------------------------------------------------------------------
Ran 1 test in 0.000s

FAILED (errors=1)
punkpony commented 2 years ago

OK got the conda channel solved at least -

try install openbabel by using "conda install -c openbabel openbabel" please do not use it - it is DEPRECATED. use conda-forge

https://anaconda.org/conda-forge/openbabel

Isra3l commented 2 years ago

Hey all,

1 - The open Babel installation using conda can be found in the Installation section. (with conda-forge)

2- The missing 'plt.pdb' file means that BOSS is not working. Probably you have to install the 32 bits libraries in your machine.

You can test your BOSS installation by typing ./BOSS in your terminal.

You should get something like:

israel@lenny:yourbossfolder/BOSS Insufficient arguments! you need to specify at least five, i.e. /home/israel/apps/boss/BOSS 001 100000 0.0 0.0 0.0 Insufficient arguments! you need to specify at least five, i.e. /home/israel/apps/boss/BOSS 001 100000 0.0 0.0 0.0

If your output is different, BOSS is not working.

3 - LBCC problem. LBCC charge model requires BOSS5.0 but the BOSS version provided from the official website is BOSS4.9. I guess that they will update the latest BOSS version soon. If you really needed it, I recommend you send an email to Prof. Jorgensen asking if it is possible to download BOSS5.0.

Best,

Israel