Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error with charged ligand #109

Closed
gokulalgates opened this issue Feb 16, 2023 · 1 comment
Closed

error with charged ligand #109

gokulalgates opened this issue Feb 16, 2023 · 1 comment

Comments

@gokulalgates
Copy link

I am getting the following error for a charged ligand

[IPKernelApp] ERROR | Exception in message handler:
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/site-packages/prolif/parallel.py", line 16, in process_chunk
lig_mol = Molecule.from_mda(lig, **lig_kwargs)
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/site-packages/prolif/molecule.py", line 120, in from_mda
mol = ag.convert_to.rdkit(**kwargs)
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/site-packages/MDAnalysis/converters/RDKit.py", line 339, in convert
mol = atomgroup_to_mol(ag, **kwargs)
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/site-packages/MDAnalysis/converters/RDKit.py", line 398, in atomgroup_to_mol
raise AttributeError(
AttributeError: No hydrogen atom could be found in the topology, but the converter requires all hydrogens to be explicit. You can use the parameter NoImplicit=False when using the converter to allow implicit hydrogens and disable inferring bond orders and charges. You can also use force=True to ignore this error.
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3251, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "/tmp/ipykernel_2280/3139048839.py", line 4, in
fp.run(u.trajectory[::10], lig, prot)
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/site-packages/prolif/fingerprint.py", line 456, in run
return self._run_parallel(
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/site-packages/prolif/fingerprint.py", line 524, in _run_parallel
for ifp in pool.imap_unordered(process_chunk, args):
File "/home/singam2/anaconda3/envs/prolif/lib/python3.8/multiprocessing/pool.py", line 868, in next
raise value
AttributeError: No hydrogen atom could be found in the topology, but the converter requires all hydrogens to be explicit. You can use the parameter NoImplicit=False when using the converter to allow implicit hydrogens and disable inferring bond orders and charges. You can also use force=True to ignore this error.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 1934, in showtraceback
stb = value.render_traceback()
AttributeError: 'AttributeError' object has no attribute 'render_traceback'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3191, in run_ast_nodes
if await self.run_code(code, result, async_=asy):
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3268, in run_code
self.showtraceback(running_compiled_code=True)
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 1936, in showtraceback
stb = self.InteractiveTB.structured_traceback(etype,
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/ultratb.py", line 1105, in structured_traceback
return FormattedTB.structured_traceback(
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/ultratb.py", line 999, in structured_traceback
return VerboseTB.structured_traceback(
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/ultratb.py", line 871, in structured_traceback
formatted_exceptions += self.format_exception_as_a_whole(etype, evalue, etb, lines_of_context,
File "/home/singam2/.local/lib/python3.8/site-packages/IPython/core/ultratb.py", line 775, in format_exception_as_a_whole
assert etb is not None
AssertionError

How to resolve the error ?

with regards
Singam

@cbouy
Copy link
Member

cbouy commented Mar 7, 2023

Hi Singam,

It looks like your input does not have any hydrogen atom, but ProLIF requires all hydrogen atoms to be explicit.
You can use different tools for this like like PypKa or PropKa (also available as command line tools) for this matter.

I'll close this issue but feel free to reopen it if it does not solve your problem or your run into another error.

Best,
Cédric

@cbouy cbouy closed this as completed Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants