| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 37.5% |
| Changes | 4 | ||
| Bugs | 0 | Features | 3 |
| 1 | #! /usr/bin/env python |
||
| 16 | 1 | class UFF(ForceField): |
|
| 17 | |||
| 18 | """ Universal Force Field transformer. """ |
||
| 19 | |||
| 20 | 1 | def __init__(self, preembed=True, warn_on_fail=True, error_on_fail=False, |
|
| 21 | add_hs=True, n_jobs=1, verbose=True): |
||
| 22 | |||
| 23 | """ Initialize a UFF object. |
||
| 24 | |||
| 25 | Args: |
||
| 26 | preembed (bool): |
||
| 27 | Whether to embed before optimizing. |
||
| 28 | warn_on_fail (bool): |
||
| 29 | Whether to warn if a molecule fails to optimise. |
||
| 30 | error_on_fail (bool): |
||
| 31 | Whether to raise an error if a molecule fails to optimise. |
||
| 32 | add_hs (bool): |
||
| 33 | Whether to automatically add hydrogens. |
||
| 34 | """ |
||
| 35 | |||
| 36 | super(UFF, self).__init__(preembed=preembed, warn_on_fail=warn_on_fail, |
||
| 37 | error_on_fail=error_on_fail, add_hs=add_hs, |
||
| 38 | verbose=verbose, n_jobs=n_jobs) |
||
| 39 | |||
| 40 | 1 | def _optimize(self, mol): |
|
| 41 | try: |
||
| 42 | return UFFOptimizeMolecule(mol) |
||
| 43 | except RuntimeError: |
||
| 44 | return None |
||
This can be caused by one of the following:
1. Missing Dependencies
This error could indicate a configuration issue of Pylint. Make sure that your libraries are available by adding the necessary commands.
2. Missing __init__.py files
This error could also result from missing
__init__.pyfiles in your module folders. Make sure that you place one file in each sub-folder.