File openeye.py
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
"""Adapted from openmoltools: https://github.com/choderalab/openmoltools.
Original license and copyright:
Copyright 2017 Kyle A. Beauchamp, John D. Chodera, David L. Mobley
Function get_charges
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def get_charges(
molecule,
max_confs=800,
strictStereo=True,
normalize=True,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function assignELF10charges
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def assignELF10charges(molecule, max_confs: int = -1, strictStereo=True):
"""
This function computes atomic partial charges for an OEMol by
using the ELF10 method
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function molecule_to_mol2
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def molecule_to_mol2(
molecule,
tripos_mol2_filename=None,
conformer=0,
residue_name="MOL",
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_charges
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
def get_charges(
Function generate_conformers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_conformers(
Function smiles_to_antechamber
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def smiles_to_antechamber(
Function molecule_to_mol2
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def molecule_to_mol2(
Function oemols_to_ffxml
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def oemols_to_ffxml(molecules, base_molecule_name="lig"):
"""Generate an OpenMM ffxml object and MDTraj trajectories from multiple OEMols
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"