Showing 1 of 1 files from the diff.

@@ -1182,7 +1182,7 @@
Loading
1182 1182
        if 'heuristic' not in self._options:
1183 1183
            self._options['heuristic'] = heuristic
1184 1184
        atoms, bonds = self._get_torsion_quartet(bond_tuple)
1185 -
        atom_map_idx, bond_tuples = self._get_ring_and_fgroups(atoms, bonds, central_bond=bond_tuple)
1185 +
        atom_map_idx, bond_tuples = self._get_ring_and_fgroups(atoms, bonds)
1186 1186
1187 1187
        # bond = self.get_bond(bond_tuple=bond_tuple)
1188 1188
        #
@@ -1264,14 +1264,12 @@
Loading
1264 1264
1265 1265
        return atom_map_idx, bond_tuples
1266 1266
1267 -
    def _get_ring_and_fgroups(self, atoms, bonds, central_bond):
1267 +
    def _get_ring_and_fgroups(self, atoms, bonds):
1268 1268
        """
1269 1269
        Keep ortho substituents
1270 1270
        Parameters
1271 1271
        ----------
1272 -
        atoms : set ints atom indices
1273 -
        bonds: set of bond tuples
1274 -
        central_bond: bond tuple
1272 +
        torions_quartet : set of set of ints and set of bond tuples
1275 1273
1276 1274
        Returns
1277 1275
        -------
@@ -1295,24 +1293,24 @@
Loading
1295 1293
                new_atoms.update(self.ring_systems[ring_idx][0])
1296 1294
                new_bonds.update(self.ring_systems[ring_idx][1])
1297 1295
1298 -
        # Now check for ortho substituents to any bond bonded to central bond
1296 +
        # Now check for ortho substituents to any bond in the fragment
1299 1297
        for bond in bonds:
1300 -
            # Only add ortho if the bond is bonded to the central bond to avoid having meta substituents come along without first evaluating if they are needed
1301 -
            if bond[0] in central_bond or bond[1] in central_bond:
1302 -
                oe_bond = self.get_bond(bond)
1303 -
                a1 = oe_bond.GetBgn()
1304 -
                a2 = oe_bond.GetEnd()
1305 -
                if not oe_bond.IsInRing() and (a1.IsInRing() or a2.IsInRing()) and (not a1.IsHydrogen() and not a2.IsHydrogen()):
1306 -
                    if a1.IsInRing():
1307 -
                        ring_idx = a1.GetData('ringsystem')
1308 -
                    elif a2.IsInRing():
1309 -
                        ring_idx = a2.GetData('ringsystem')
1310 -
                    else:
1311 -
                        print('Only one atom should be in a ring when checking for ortho substituents')
1312 -
                    ortho = self._find_ortho_substituent(ring_idx=ring_idx, rot_bond=bond)
1313 -
                    if ortho:
1314 -
                        new_atoms.update(ortho[0])
1315 -
                        new_bonds.update(ortho[1])
1298 +
            oe_bond = self.get_bond(bond)
1299 +
            a1 = oe_bond.GetBgn()
1300 +
            a2 = oe_bond.GetEnd()
1301 +
            if not oe_bond.IsInRing() and (a1.IsInRing() or a2.IsInRing()) and (
1302 +
                    not a1.IsHydrogen() and not a2.IsHydrogen()):
1303 +
                if a1.IsInRing():
1304 +
                    ring_idx = a1.GetData('ringsystem')
1305 +
                elif a2.IsInRing():
1306 +
                    ring_idx = a2.GetData('ringsystem')
1307 +
                else:
1308 +
                    print('Only one atom should be in a ring when checking for ortho substituents')
1309 +
                ortho = self._find_ortho_substituent(ring_idx=ring_idx, rot_bond=bond)
1310 +
                print('ortho: {}'.format(ortho))
1311 +
                if ortho:
1312 +
                    new_atoms.update(ortho[0])
1313 +
                    new_bonds.update(ortho[1])
1316 1314
        atoms.update(new_atoms)
1317 1315
        bonds.update(new_bonds)
1318 1316
Files Coverage
fragmenter 60.02%
Project Totals (6 files) 60.02%
567.1
TRAVIS_OS_NAME=osx
568.2
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
568.1
TRAVIS_OS_NAME=osx
1
# Codecov configuration to make it a bit less noisy
2
coverage:
3
  status:
4
    patch: false
5
    project:
6
      default:
7
        threshold: 50%
8
comment:
9
  layout: "header"
10
  require_changes: false
11
  branches: null
12
  behavior: default
13
  flags: null
14
  paths: null
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading