for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
#! /usr/bin/env python
#
# Copyright (C) 2007-2009 Rich Lewis <[email protected]>
# License: 3-clause BSD
"""
skchem.core.conformer
Defining conformers in scikit-chem.
import rdkit.Chem
rdkit.Chem
This can be caused by one of the following:
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
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.
__init__.py
from skchem.core import Point3D
from skchem.core import ChemicalObject
class Conformer(rdkit.Chem.rdchem.Conformer, ChemicalObject):
""" Class representing a Conformer in scikit-chem. """
#should use a view, list for now
@property
def atom_positions(self):
""" Return the atom positions in the conformer for the atoms in the molecule. """
return [Point3D.from_super(self.GetAtomPosition(i)) for i in range(self.GetNumAtoms())]
Conformer
GetAtomPosition
This check looks for calls to members that are non-existent. These calls will fail.
The member could have been renamed or removed.
GetNumAtoms
@atom_positions.setter
def atom_positions(self, value):
""" Set the atom positions in the conformer. Not implemented. """
raise NotImplementedError
def is_three_d(self):
""" Return whether the conformer is three dimensional. """
return self.is3D()
is3D
@is_three_d.setter
def is_three_d(self, value):
""" Set whether the conformer is three dimensional. """
self.set3D(value)
set3D
def __repr__(self):
return '<{klass} id="{id}" at {address}>'.format(klass=self.__class__.__name__, \
id=self.GetId(), address=hex(id(self)))
GetId
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.