MatthijsHak / MetalDock

Dock organometallic compounds to proteins/DNA/biomolecules
MIT License
7 stars 6 forks source link

Problem in executing the example file only. #36

Open DCB0I opened 1 month ago

DCB0I commented 1 month ago

(MetalDock) chemistry3@fedora:~/MetalDock/examples/example_runs/vacancy_coordination_sphere/GAUSSIAN$ metaldock -i input.ini Traceback (most recent call last): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/extxyz.py", line 743, in read_xyz natoms = int(line) ValueError: invalid literal for int() with base 10: 'Open Babel 3.1.0 -- Sep 16 2021 -- 06:44:16\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/chemistry3/MetalDock/metaldock", line 6, in main() File "/home/chemistry3/MetalDock/src/metal_dock/main.py", line 18, in main docking(par) File "/home/chemistry3/MetalDock/src/metal_dock/docking.py", line 77, in docking qm_dir, energy = g.gaussian_engine(xyz_file, par, output_dir) File "/home/chemistry3/MetalDock/src/metal_dock/gaussian_engine.py", line 67, in gaussian_engine gaussian_sp('output.xyz', var) File "/home/chemistry3/MetalDock/src/metal_dock/gaussian_engine.py", line 182, in gaussian_sp mol = read(xyz_file) File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/formats.py", line 736, in read return next(_iread(filename, slice(index, None), format, io, File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/parallel.py", line 275, in new_generator for result in generator(*args, *kwargs): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/formats.py", line 803, in _iread for dct in io.read(fd, args, kwargs): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/formats.py", line 559, in wrap_read_function for atoms in read(filename, index, kwargs): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/extxyz.py", line 745, in read_xyz raise XYZError('ase.io.extxyz: Expected xyz header but got: {}' ase.io.extxyz.XYZError: ase.io.extxyz: Expected xyz header but got: invalid literal for int() with base 10: 'Open Babel 3.1.0 -- Sep 16 2021 -- 06:44:16\n'

MatthijsHak commented 1 month ago

Hi,

Can you please be a little bit more specific which files have you run. Could you please share with me all the files in your input directory, and the output directory with the corresponding file created. I can deduce better what the problem is.

DCB0I commented 1 month ago

I am attaching the files here. Any kind of help will be very much appreciated.

On Fri, Jul 19, 2024 at 1:38 PM MatthijsHak @.***> wrote:

Hi,

Can you please be a little bit more specific which files have you run. Could you please share with me all the files in your input directory, and the output directory with the corresponding file created. I can deduce better what the problem is.

— Reply to this email directly, view it on GitHub https://github.com/MatthijsHak/MetalDock/issues/36#issuecomment-2238606216, or unsubscribe https://github.com/notifications/unsubscribe-auth/BDR3OMBBNH3J42SDNZOCP3LZNDCQHAVCNFSM6AAAAABLEDHRPOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZYGYYDMMRRGY . You are receiving this because you authored the thread.Message ID: @.***>

DCB0I commented 1 month ago

https://drive.google.com/drive/u/2/folders/1SZxJLlWl69hIlmzHIAt-yJTxYiHUXEW2

MatthijsHak commented 1 month ago

You do not have any files related to Gaussian in your output/QM directory. I therefore believe that probably the configuration with Gaussian is not correct. You should obtain a single_point.log file in which the output of the QM calculation is written.

DCB0I commented 1 month ago

I followed the instructions as stated and within the folder containing the .pdb, .xyz and .ini file. Then I opened the terminal within it and activated the environment MetalDock and wrote metaldock -i file_name.ini. My system contains Gaussian v6. Do I have to specify the path directory somewhere.

MatthijsHak commented 1 month ago

The following environment variable should be set:

export g16root=/full/path/to/gaussian/g16

Could you verify if the path to the gaussian binary is correclty set?

DCB0I commented 1 month ago

OK can you tell me where to find this actually? When I call gv6 in the terminal, the application opens up by the way.

MatthijsHak commented 1 month ago

In your terminal you should type before executing Gaussian export g16root=/your/path/to/gaussian/g16 (where you change the path to the path to the g16 executable). To verify if it was successful, you can then type echo $g16root, and the terminal should then print the path that you have just set.

DCB0I commented 1 month ago

The path to gaussian is correctly as mentioned but still the error says like this : Traceback (most recent call last): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/extxyz.py", line 743, in read_xyz natoms = int(line) ValueError: invalid literal for int() with base 10: 'Open Babel 3.1.0 -- Sep 16 2021 -- 06:44:16\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/chemistry3/MetalDock/metaldock", line 6, in main() File "/home/chemistry3/MetalDock/src/metal_dock/main.py", line 18, in main docking(par) File "/home/chemistry3/MetalDock/src/metal_dock/docking.py", line 77, in docking qm_dir, energy = g.gaussian_engine(xyz_file, par, output_dir) File "/home/chemistry3/MetalDock/src/metal_dock/gaussian_engine.py", line 23, in gaussian_engine gaussian_geom_opt(xyz_file, var) File "/home/chemistry3/MetalDock/src/metal_dock/gaussian_engine.py", line 124, in gaussian_geom_opt mol = read(xyz_file) File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/formats.py", line 736, in read return next(_iread(filename, slice(index, None), format, io, File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/parallel.py", line 275, in new_generator for result in generator(*args, *kwargs): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/formats.py", line 803, in _iread for dct in io.read(fd, args, kwargs): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/formats.py", line 559, in wrap_read_function for atoms in read(filename, index, kwargs): File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/extxyz.py", line 745, in read_xyz raise XYZError('ase.io.extxyz: Expected xyz header but got: {}' ase.io.extxyz.XYZError: ase.io.extxyz: Expected xyz header but got: invalid literal for int() with base 10: 'Open Babel 3.1.0 -- Sep 16 2021 -- 06:4 4:16\n'

MatthijsHak commented 1 month ago

To verify that ASE and Gaussian are correctly connected could you please create the following python script:

from ase import Atoms
from ase.calculators.gaussian import Gaussian

atoms = Atoms('H2', [[0, 0, 0], [0, 0, 0.74]])
atoms.calc = Gaussian(mem='1GB',
                      chk='MyJob.chk',
                      save=None,
                      method='b3lyp',
                      basis='6-31G',
                      scf='qc')
atoms.get_potential_energy()

And run the python script with the python of the MetalDock conda environment.

DCB0I commented 1 month ago

atoms = Atoms('H2', [[0,0,0], [0,0,0.74]]) atoms.calc = Gaussian(mem='1GB', ... chk='Testing.chk', ... save=None, ... method='b3lyp', ... basis='6-31G', ... scf='qc') atoms.get_potential_energy() -31.986361860985223

This appears to be working properly. However the error with the input file still persists and shows the same thing.

MatthijsHak commented 1 month ago

Okay great. I now understand that it has to do with your openbabel, and the error starts with the first line of code being executed. For some reason openbabel is incorrectly executed on your machine. Now the xyz file of your specify the following error:

Open Babel 3.1.0 -- Sep 16 2021 -- 06:44:16 Usage: obabel [-i] [-o] -O [Options] Try -H option for more information.

If I install openbabel via conda install openbabel, I obtain the following version:

Open Babel 3.1.0 -- Nov 30 2023 -- 20:44:30

Could you try to uninstall / remove openbabel from your conda environment and reinstall it.

DCB0I commented 1 month ago

This solved my problem however when I try using this on my experimental complex such an error shows up: GAUSSIAN REQUIRES A SINGLE POINT CALCULATION TO EXTRACT CM5 CHARGES

SINGLE POINT SUCCESSFULLY PERFORMED

SPACING BETWEEN GRID POINTS IS STANDARD SET TO 0.375 Å BOX SIZE MUST BE INTEGER GRID POINTS WHICH WAS NOT FOUND BOX SIZE SIDE ROUNDED UP AND SET TO 120.301 Å

Traceback (most recent call last): File "/home/chemistry3/MetalDock/metaldock", line 6, in main() File "/home/chemistry3/MetalDock/src/metal_dock/main.py", line 18, in main docking(par) File "/home/chemistry3/MetalDock/src/metal_dock/docking.py", line 156, in docking d.create_ligand_pdbqt_file(par, par.name_ligand) File "/home/chemistry3/MetalDock/src/metal_dock/prepare_dock.py", line 460, in create_ligand_pdbqt_file line[8] = cm[atom_id][1] IndexError: list index out of range Can you tell me where the problem might be?

MatthijsHak commented 1 month ago

Do you have the latest repository? It could be a bug from a earlier version.

DCB0I commented 1 month ago

I executed one of the example run and it ran just fine. However this is the message I am getting when I am using it for my complex and DNA (as the receptor).

MatthijsHak commented 1 month ago

I do not see the message.

DCB0I commented 2 weeks ago

I have 2 questions:

  1. Does the PDB file that we are describing in the input file contain the metal complex docked with the biomolecule? Now what to do if I do not have the crystallographic structure of the metal organometallic complexed with my biomolecule?
  2. I am facing problems when I am trying to make metaldock work for my experimental complex. I am receiving an error like this: (MetalDock) chemistry3@fedora:~/Desktop/GROMAC_Ni_DNA/metaldock_Ru$ metaldock -i input.ini Traceback (most recent call last): File "/home/chemistry3/MetalDock/metaldock", line 6, in main() File "/home/chemistry3/MetalDock/src/metal_dock/main.py", line 18, in main docking(par) File "/home/chemistry3/MetalDock/src/metal_dock/docking.py", line 77, in docking qm_dir, energy = g.gaussian_engine(xyz_file, par, output_dir) File "/home/chemistry3/MetalDock/src/metal_dock/gaussian_engine.py", line 23, in gaussian_engine gaussian_geom_opt(xyz_file, var) File "/home/chemistry3/MetalDock/src/metal_dock/gaussian_engine.py", line 175, in gaussian_geom_opt opt.run(fmax='tight') File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/calculators/gaussian.py", line 63, in run self.atoms.get_potential_energy() File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/atoms.py", line 731, in get_potential_energy energy = self._calc.get_potential_energy(self) File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/calculators/calculator.py", line 709, in get_potential_energy energy = self.get_property('energy', atoms) File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/calculators/calculator.py", line 737, in get_property self.calculate(atoms, [name], system_changes) File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/calculators/gaussian.py", line 116, in calculate FileIOCalculator.calculate(self, *args, **kwargs) File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/calculators/calculator.py", line 940, in calculate self.read_results() File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/calculators/gaussian.py", line 124, in read_results output = read(self.label + '.log', format='gaussian-out') File "/home/chemistry3/.conda/envs/MetalDock/lib/python3.8/site-packages/ase/io/formats.py", line 736, in read return next(_iread(filename, slice(index, None), format, io, StopIteration