File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,18 @@ def get_fragment_from_torsion(
361361 self .get_selected_atoms ()
362362 print (f"Selected Atoms after adding non-C/H: { self .selected_atoms } " )
363363
364+ # Find all the atoms linked to rings if the ring included in layer_1
365+ for nring , ring in enumerate (self .rings ):
366+ if layer_1 [0 ] in ring or layer_1 [1 ] in ring :
367+ # loop all the atoms linked to ring
368+ for atom_idx in ring :
369+ atom = self .mol .GetAtomWithIdx (atom_idx )
370+ for neighbor in atom .GetNeighbors ():
371+ neighbor_idx = neighbor .GetIdx ()
372+ self .add_atom (neighbor_idx )
373+ self .get_selected_atoms ()
374+ print (f"Selected Atoms after adding all atoms linked to layer 1 rings: { self .selected_atoms } " )
375+
364376 # [start] >>> Functional Groups <<<
365377
366378 # Find P and S atoms in self.selected_atoms linked to O and then add all atoms linked to that S
You can’t perform that action at this time.
0 commit comments