choderalab/protons

View on GitHub
protons/app/data/Amber_input_files/2-process_raw_xml_file.py

Summary

Maintainability
A
3 hrs
Test Coverage

Avoid deeply nested control flow statements.
Open

                for bond in residue.xpath(
                    'Bond[@atomName1="{0}" or @atomName2="{0}"]'.format(aname)
                ):
                    if bond.get("atomName1") == aname:
                        bond.set("atomName1", preferred_name)
Severity: Major
Found in protons/app/data/Amber_input_files/2-process_raw_xml_file.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                    if index == 0:
                        atoms[atom_index] = deepcopy(protons_atom)
                    state_block.append(protons_atom)
    Severity: Major
    Found in protons/app/data/Amber_input_files/2-process_raw_xml_file.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      if parmed_atomname == "OP1":
                          parmed_atomname = "O1P"
                      elif parmed_atomname == "OP2":
                          parmed_atomname = "O2P"
                      elif parmed_atomname == "H5'":
      Severity: Major
      Found in protons/app/data/Amber_input_files/2-process_raw_xml_file.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                        if atom_refactors[aname] == False:
                            bond.getparent().remove(bond)
                        else:
                            bond.set(atom, atom_refactors[aname])
        
        
        Severity: Major
        Found in protons/app/data/Amber_input_files/2-process_raw_xml_file.py - About 45 mins to fix

          There are no issues that match your filters.

          Category
          Status