choderalab/protons

View on GitHub

Showing 288 of 347 total issues

Avoid too many return statements within this function.
Open

        return True
Severity: Major
Found in protons/app/driver.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return False
    Severity: Major
    Found in protons/app/driver.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return False
      Severity: Major
      Found in protons/app/driver.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                                return False
        Severity: Major
        Found in protons/app/driver.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return {"version": "0+unknown", "full-revisionid": None,
          Severity: Major
          Found in versioneer.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return {
            Severity: Major
            Found in protons/_version.py - About 30 mins to fix

              Function observed has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def observed(self, titration_states: List[int]) -> np.float64:
                      """Return the histogram count for the supplied state."""
                      # In case of the one site sams approach, the sams weight is the total weight of every titration state
              
                      counts = None
              Severity: Minor
              Found in protons/app/driver.py - About 25 mins to fix

              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 free_energy has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def free_energy(self, titration_states: List[int]) -> float:
                      """Return the sams free energy value for the provided titration state.
              
                      Parameters
                      ----------
              Severity: Minor
              Found in protons/app/driver.py - About 25 mins to fix

              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 run_proplister has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def run_proplister(input_file_path):
                  """Run proplister utility on a file and return its properties.
              
                  Parameters
                  ----------
              Severity: Minor
              Found in protons/app/schrodinger.py - About 25 mins to fix

              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 from_lists has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def from_lists(
                      cls,
                      g_k,
                      parameters,
                      proton_count,
              Severity: Minor
              Found in protons/app/driver.py - About 25 mins to fix

              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 _add_isomers has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _add_isomers(self):
                      """
                      Add all the isomer specific data to the xml template.
                      """
              
              
              Severity: Minor
              Found in protons/app/ligands.py - About 25 mins to fix

              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 _propose_random_change has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _propose_random_change(
                      self, proposal: _StateProposal, residue_pool: Optional[str] = None
                  ) -> _TitrationAttemptData:
                      """Use a given proposal mechanism to propose a titration state update for a given group of residues."""
                      # Select which titratible residues to update.
              Severity: Minor
              Found in protons/app/driver.py - About 25 mins to fix

              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 run_epik has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def run_epik(
                  input_file_path,
                  output_file_path,
                  max_structures=32,
                  ph=7.4,
              Severity: Minor
              Found in protons/app/schrodinger.py - About 25 mins to fix

              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_sd_bonds has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def get_sd_bonds(sdfilename: str) -> List[Dict[Tuple[int, int], int]]:
                  """Parse an SD file/MDL mol file and return a representation of the bonds.
              
                  Parameters
                  ----------
              Severity: Minor
              Found in protons/app/ligands.py - About 25 mins to fix

              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 _complete_atom_registry has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _complete_atom_registry(self):
                      """
                      Registers unique atom names. Store in self._atom_names from Residue
                      """
                      for state in self._input_state_data:
              Severity: Minor
              Found in protons/app/ligands.py - About 25 mins to fix

              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 from_lists has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def from_lists(
                      cls,
                      g_k: float,
                      charges: List[float],
                      proton_count: int,
              Severity: Minor
              Found in protons/app/driver.py - About 25 mins to fix

              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 _find_hydrogen_types_for_tautomers has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def _find_hydrogen_types_for_tautomers(
                  gafftree: lxml.etree.ElementTree, xmlfftree: lxml.etree.ElementTree
              ) -> set:
                  """
                  Find all atom types that describe hydrogen atoms.
              Severity: Minor
              Found in protons/app/ligands.py - About 25 mins to fix

              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 cli has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def cli() -> None:
                  """Command line interface for protons run script."""
              
                  args = sys.argv
              
              
              Severity: Minor
              Found in protons/scripts/cli.py - About 25 mins to fix

              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 from_serialized_xml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

                  def from_serialized_xml(cls, xmltree):
                      """Create a titratable residue from a serialized titratable residue.
              
                      Parameters
                      ----------
              Severity: Minor
              Found in protons/app/driver.py - About 25 mins to fix

              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 generate_protons_ffxml has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def generate_protons_ffxml(
                  inputmol2: str,
                  isomer_dicts: list,
                  outputffxml: str,
                  pH: float,
              Severity: Minor
              Found in protons/app/ligands.py - About 25 mins to fix

              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

              Severity
              Category
              Status
              Source
              Language