Completed
Push — master ( 24f8d3...86beb5 )
by Rich
01:25
created

UFF._optimize()   A

Complexity

Conditions 1

Size

Total Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 2
rs 10
c 1
b 0
f 1
cc 1
1
#! /usr/bin/env python
2
#
3
# Copyright (C) 2015 Rich Lewis <[email protected]>
4
# License: 3-clause BSD
5
6
"""
7
## skchem.forcefields.uff
8
9
Module specifying the universal force field.
10
"""
11
import warnings
0 ignored issues
show
Unused Code introduced by
The import warnings seems to be unused.
Loading history...
12
13
from .base import ForceField
14
from rdkit.Chem.rdForceFieldHelpers import UFFOptimizeMolecule
0 ignored issues
show
Configuration introduced by
The import rdkit.Chem.rdForceFieldHelpers could not be resolved.

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.

# .scrutinizer.yml
before_commands:
    - sudo pip install abc # Python2
    - sudo pip3 install abc # Python3
Tip: We are currently not using virtualenv to run pylint, when installing your modules make sure to use the command for the correct version.

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.

Loading history...
15
16
17
class UFF(ForceField):
0 ignored issues
show
Coding Style introduced by
This class should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
18
19
    def __init__(self, **kwargs):
20
        super(UFF, self).__init__(**kwargs)
21
22
    def _optimize(self, mol):
23
        return UFFOptimizeMolecule(mol)
24