Skip to content

Example command crashing #54

@OmeirK

Description

@OmeirK

Hello,

I am trying to set up LUNA, and I am running into issues running the example command line interface command provided in the documentation.

The specific command I am trying to run is listed below:
$ python $LUNA_REPO/luna/run.py -p inputs/protein.pdb -l inputs/ligands.mol2 -e inputs/entries.txt -w dopamine_results

Based on the log file, it seems like LUNA is crashing because it tries to download "protein.pdb" for the RCSB, and is assuming the "protein.pdb" is a four letter PDB identifier. Is this the intended behavior of the code? If so, is it still possible to provide a path to a custom PDB file that I have prepared myself?

The full output in the log file is attached below:
`[2025-05-12 11:39:52] INFO projects.py:590 MainProcess Logging file 'dopamine_results//logs/project.log' initialized successfully.
[2025-05-12 11:39:52] DEBUG projects.py:590 MainProcess New project initialized...
[2025-05-12 11:39:52] DEBUG projects.py:590 MainProcess Preferences:
-- _loaded_logging_file = False
-- _logging_enabled = True
-- _nproc = 31
-- _paths = ['chunks', 'configs', 'logs', 'pdbs', 'results/interactions', 'results/fingerprints', 'results/pse', 'results', 'tmp']
-- _verbosity = 20
-- add_h = True
-- amend_mol = True
-- append_mode = False
-- atom_prop_file = /projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/data/LUNA.fdef
-- binding_mode_filter = None
-- cache = None
-- calc_ifp = False
-- calc_mfp = False
-- # entries = 5
-- errors = []
-- ifp_count = True
-- ifp_diff_comp_classes = True
-- ifp_length = 4096
-- ifp_num_levels = 2
-- ifp_output = None
-- ifp_radius_step = 5.73171
-- ifp_sim_matrix_output = None
-- ifp_type = IFPType.EIFP
-- inter_calc = <luna.interaction.calc.InteractionCalculator object at 0x7f92b6816790>
-- logging_file = dopamine_results//logs/project.log
-- mfp_output = None
-- out_pse = False
-- overwrite_path = False
-- pdb_path = dopamine_results//pdbs/
-- ph = 7.4
-- pse_path = None
-- use_cache = False
-- version = 0.13.1
-- working_path = dopamine_results/
[2025-05-12 11:39:52] INFO projects.py:590 MainProcess The remotion of duplicate entries was finished. 0 entrie(s) were removed.
[2025-05-12 11:39:52] INFO projects.py:590 MainProcess It will verify the existence of PDB files and download them as necessary.
[2025-05-12 11:39:52] INFO projects.py:706 MainProcess 0 PDB file(s) found at 'dopamine_results//pdbs/' from a total of 1 PDB(s). So, 1 PDB(s) need to be downloaded.
[2025-05-12 11:39:52] DEBUG util.py:58 ConsumerProcess-0 It will try to download the PDB 'inputs/protein.pdb' and store it at the directory 'dopamine_results//pdbs/'.
[2025-05-12 11:39:52] ERROR jobs.py:105 ConsumerProcess-0 Required structure doesn't exist
Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/urllib/request.py", line 1556, in ftp_open
host = socket.gethostbyname(host)
socket.gaierror: [Errno -2] Name or service not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/PDB/PDBList.py", line 286, in retrieve_pdb_file
_urlretrieve(url, filename)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/urllib/request.py", line 247, in urlretrieve
with contextlib.closing(urlopen(url, data)) as fp:
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/urllib/request.py", line 1558, in ftp_open
raise URLError(msg)
urllib.error.URLError: <urlopen error [Errno -2] Name or service not known>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/util/jobs.py", line 99, in _exec_func
output = func(*data)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/util.py", line 68, in download_pdb
file_format="pdb", overwrite=overwrite)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/PDB/PDBList.py", line 288, in retrieve_pdb_file
raise IOError("Required structure doesn't exist")
OSError: Required structure doesn't exist
[2025-05-12 11:39:52] WARNING projects.py:590 MainProcess Number of PDBs with errors: 1. Check the log file to see the complete list of PDBs that failed.
[2025-05-12 11:39:52] DEBUG projects.py:590 MainProcess PDBs that failed: inputs/protein.pdb.
[2025-05-12 11:39:52] INFO projects.py:590 MainProcess Entries processing will start. Number of entries to be processed is: 5.
[2025-05-12 11:39:52] INFO projects.py:590 MainProcess The number of processes was set to: 31.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-0 Starting entry processing: inputs/protein.pdb:ZINC000012442563.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-0 Processing of entry 'inputs/protein.pdb:ZINC000012442563' failed. Check the logs for more information.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-1 Starting entry processing: inputs/protein.pdb:ZINC000065293174.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-2 Starting entry processing: inputs/protein.pdb:ZINC000096459890.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-3 Starting entry processing: inputs/protein.pdb:ZINC000343043015.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-4 Starting entry processing: inputs/protein.pdb:ZINC000575033470.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-1 Processing of entry 'inputs/protein.pdb:ZINC000065293174' failed. Check the logs for more information.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-2 Processing of entry 'inputs/protein.pdb:ZINC000096459890' failed. Check the logs for more information.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-3 Processing of entry 'inputs/protein.pdb:ZINC000343043015' failed. Check the logs for more information.
[2025-05-12 11:39:53] DEBUG projects.py:590 ConsumerProcess-4 Processing of entry 'inputs/protein.pdb:ZINC000575033470' failed. Check the logs for more information.
[2025-05-12 11:39:53] ERROR jobs.py:105 ConsumerProcess-0 [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/util/jobs.py", line 102, in _exec_func
output = func(data)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 1149, in _process_entry
pdb_parser, structure, ligand = self._parse_complex(entry)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 760, in _parse_complex
structure = pdb_parser.get_structure(entry.pdb_id, pdb_file)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/PDB/PDBParser.py", line 151, in get_structure
with as_handle(file, mode='rU') as handle:
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/Bio/File.py", line 101, in as_handle
with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
[2025-05-12 11:39:53] ERROR jobs.py:105 ConsumerProcess-3 [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/util/jobs.py", line 102, in _exec_func
output = func(data)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 1149, in _process_entry
pdb_parser, structure, ligand = self._parse_complex(entry)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 760, in _parse_complex
structure = pdb_parser.get_structure(entry.pdb_id, pdb_file)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/PDB/PDBParser.py", line 151, in get_structure
with as_handle(file, mode='rU') as handle:
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/Bio/File.py", line 101, in as_handle
with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
[2025-05-12 11:39:53] ERROR jobs.py:105 ConsumerProcess-2 [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/util/jobs.py", line 102, in _exec_func
output = func(data)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 1149, in _process_entry
pdb_parser, structure, ligand = self._parse_complex(entry)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 760, in _parse_complex
structure = pdb_parser.get_structure(entry.pdb_id, pdb_file)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/PDB/PDBParser.py", line 151, in get_structure
with as_handle(file, mode='rU') as handle:
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/Bio/File.py", line 101, in as_handle
with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
[2025-05-12 11:39:53] ERROR jobs.py:105 ConsumerProcess-1 [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/util/jobs.py", line 102, in _exec_func
output = func(data)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 1149, in _process_entry
pdb_parser, structure, ligand = self._parse_complex(entry)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 760, in _parse_complex
structure = pdb_parser.get_structure(entry.pdb_id, pdb_file)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/PDB/PDBParser.py", line 151, in get_structure
with as_handle(file, mode='rU') as handle:
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/Bio/File.py", line 101, in as_handle
with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
[2025-05-12 11:39:53] ERROR jobs.py:105 ConsumerProcess-4 [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
Traceback (most recent call last):
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/util/jobs.py", line 102, in _exec_func
output = func(data)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 1149, in _process_entry
pdb_parser, structure, ligand = self._parse_complex(entry)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/projects.py", line 760, in _parse_complex
structure = pdb_parser.get_structure(entry.pdb_id, pdb_file)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/luna/MyBio/PDB/PDBParser.py", line 151, in get_structure
with as_handle(file, mode='rU') as handle:
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/projectnb/docking/omeir/conda_envs/luna-env/lib/python3.7/site-packages/Bio/File.py", line 101, in as_handle
with open(handleish, mode, **kwargs) as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'dopamine_results//pdbs//inputs/protein.pdb.pdb'
[2025-05-12 11:39:53] CRITICAL projects.py:590 MainProcess Entries processing failed.
[2025-05-12 11:39:53] INFO projects.py:590 MainProcess Project creation completed!!!
[2025-05-12 11:39:53] INFO projects.py:590 MainProcess Total processing time: 0.61s.
[2025-05-12 11:39:53] INFO projects.py:590 MainProcess Results were saved at dopamine_results/.
[2025-05-12 11:39:53] INFO projects.py:590 MainProcess You can reload your project from dopamine_results//project_v0.13.1.pkl.gz.
`

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions