1 | #! /usr/bin/env python |
||
2 | # |
||
3 | # Copyright (C) 2016 Rich Lewis <[email protected]> |
||
4 | # License: 3-clause BSD |
||
5 | |||
6 | 1 | """ |
|
7 | ## skchem.forcefields.mmff |
||
8 | |||
9 | Module specifying the Merck Molecular Force Field. |
||
10 | """ |
||
11 | 1 | from rdkit.Chem.rdForceFieldHelpers import MMFFOptimizeMolecule |
|
0 ignored issues
–
show
|
|||
12 | |||
13 | 1 | from .base import ForceField |
|
14 | |||
15 | |||
16 | 1 | class MMFF(ForceField): |
|
17 | |||
18 | """ Merck Molecular Force Field transformer. """ |
||
19 | |||
20 | 1 | def __init__(self, preembed=True, warn_on_fail=True, error_on_fail=False, |
|
0 ignored issues
–
show
|
|||
21 | add_hs=True, n_jobs=1, verbose=True): |
||
22 | |||
23 | """ Initialize a MMFF 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 | super(MMFF, self).__init__(preembed=preembed, |
||
36 | 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 | |||
42 | return MMFFOptimizeMolecule(mol) |
||
0 ignored issues
–
show
|
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__.py
files in your module folders. Make sure that you place one file in each sub-folder.