set the cycle to be an aromatic ring
429115
def set_aromatic(self):
        """"""
        #XXX FIX ME
        # this probably shouldn't be here
        for atom in self.atoms:
            atom.aromatic = 1
            
        for bond in self.bonds:
            bond.aromatic = 1
            bond.bondorder = 1.5
            bond.bondtype = 4
            bond.symbol = ":"
            bond.fixed = 1

        self.aromatic = 1
950029
private IAtomContainer removingFlagsAromaticity(IAtomContainer ac) {
        Iterator<IAtom> atoms = ac.atoms().iterator();
        while (atoms.hasNext())
            atoms.next().setFlag(CDKConstants.ISAROMATIC, false);
        Iterator<IBond> bonds = ac.bonds().iterator();
        while (bonds.hasNext())
            bonds.next().setFlag(CDKConstants.ISAROMATIC, false);
        return ac;
    }
415502
def setchival(self, bondorder, rotation):
        """"""
        rotation = [None, "@", "@@"][(rotation % 2)]
        # check to see if the bonds are attached
        if not bondorder: # use the default xatoms
            if len(self.oatoms) < 3 and self.explicit_hcount != 1:
                raise PinkyError("Need to have an explicit hydrogen when specifying "\
                                  "chirality with less than three bonds")
                

            self._chirality = chirality.T(self.oatoms,
                                            rotation)
            return
        if len(bondorder) != len(self.bonds):
            raise AtomError("The order of all bonds must be specified")
        
        for bond in bondorder:
            if bond not in self.bonds:
                raise AtomError("Specified bonds to assign chirality are not attatched to atom")

        order = [bond.xatom(self) for bond in bonds]
        self._chirality = chirality.T(order, rotation)
32066
private List<Integer[]> getRingSystem(IAtomContainer mol, IRingSet ringSet) {
        List<Integer[]> bondsArray;
        bondsArray = new ArrayList<Integer[]>();
        for (int r = 0; r < ringSet.getAtomContainerCount(); ++r) {
            IRing ring = (IRing) ringSet.getAtomContainer(r);
            Integer[] bondNumbers = new Integer[ring.getBondCount()];
            for (int i = 0; i < ring.getBondCount(); ++i) {
                bondNumbers[i] = mol.indexOf(ring.getBond(i));
            }
            bondsArray.add(bondNumbers);
        }
        return bondsArray;
    }
697764
def cyclic(self):
        ""
        return any(isinstance(val, Cycle) for val in self.kwargs.values())
437959
public IAtomContainer placeRingSubstituents(IRingSet rs, double bondLength) {
        logger.debug("RingPlacer.placeRingSubstituents() start");
        IRing ring = null;
        IAtom atom = null;
        IRingSet rings = null;
        IAtomContainer unplacedPartners = rs.getBuilder().newInstance(IAtomContainer.class);
        IAtomContainer sharedAtoms = rs.getBuilder().newInstance(IAtomContainer.class);
        IAtomContainer primaryAtoms = rs.getBuilder().newInstance(IAtomContainer.class);
        IAtomContainer treatedAtoms = rs.getBuilder().newInstance(IAtomContainer.class);
        Point2d centerOfRingGravity = null;
        for (int j = 0; j < rs.getAtomContainerCount(); j++) {
            ring = (IRing) rs.getAtomContainer(j); /*
                                                    * Get the j-th Ring in
                                                    * RingSet rs
                                                    */
            for (int k = 0; k < ring.getAtomCount(); k++) {
                unplacedPartners.removeAllElements();
                sharedAtoms.removeAllElements();
                primaryAtoms.removeAllElements();
                atom = ring.getAtom(k);
                rings = rs.getRings(atom);
                centerOfRingGravity = GeometryUtil.get2DCenter(rings);
                atomPlacer.partitionPartners(atom, unplacedPartners, sharedAtoms);
                atomPlacer.markNotPlaced(unplacedPartners);
                try {
                    for (int f = 0; f < unplacedPartners.getAtomCount(); f++) {
                        logger.debug("placeRingSubstituents->unplacedPartners: "
                                + (molecule.indexOf(unplacedPartners.getAtom(f)) + 1));
                    }
                } catch (Exception exc) {
                }

                treatedAtoms.add(unplacedPartners);
                if (unplacedPartners.getAtomCount() > 0) {
                    atomPlacer.distributePartners(atom, sharedAtoms, centerOfRingGravity, unplacedPartners, bondLength);
                }
            }
        }
        logger.debug("RingPlacer.placeRingSubstituents() end");
        return treatedAtoms;
    }
317633
def assign_descriptors(mol):
    
    topology.recognize(mol)
    descriptor.assign_valence(mol)
    descriptor.assign_rotatable(mol)
    topology.minify_ring(mol)
    descriptor.assign_aromatic(mol)
560977
function _cycle_p(node, stack){
	var ret = false;

	var id = node.id();
	each(stack,
	     function(item){
		 if( item == id ){
		     ret = true;
		 }
	     });

	return ret;
    }
522718
private int prepare(IAtom atom, IBond prev) {
        int count = 0;
        amap[atom.getIndex()] = 1;
        for (IBond bond : atom.bonds()) {
            if (bond == prev)
                continue;
            IAtom nbr = bond.getOther(atom);
            if (amap[nbr.getIndex()] == 0) {
                qbonds[numBonds++] = (IQueryBond) bond;
                count += prepare(nbr, bond) + 1;
            } else if (nbr.getIndex() < atom.getIndex()) {
                ++count; // ring closure
                qbonds[numBonds++] = (IQueryBond) bond;
            }
        }
        return count;
    }
1200092
def getPyroleLikeAtoms(cycle):
    """"""    
    result = {}
    # the outgoing bonds might need to be single or aromatic
    for atom in cycle.atoms:
        lookup = (atom.symbol, atom.charge, atom.hcount, len(atom.bonds))
        if PyroleTable.get(lookup, 0):
            result[atom.handle] = atom

    return result
1010728
def aromatize(self):
        
        rings = [x for x in self.sssr if 4 < len(x) < 7]
        if not rings:
            return 0
        total = 0
        while True:
            c = self._quinonize(rings, 'order')
            if c:
                total += c
            elif total:
                break

            c = self._aromatize(rings, 'order')
            if not c:
                break
            total += c

        if total:
            self.flush_cache()
        return total
1297205
function setDutyCycle()
{
	myMOSFETsensor.setDutyCycle(g_cycleNum);
	if (g_addnumBool)
		g_cycleNum += 0.1;
	else
		g_cycleNum -= 0.1;
	g_cycleCount++;
	if (g_cycleCount > 10)
	{
		g_addnumBool = !g_addnumBool;
		g_cycleCount = 0;
	}
	else
		setTimeout(setDutyCycle, 100);
}
1333177
def cycle_generator(cycle, step=1, begin=(0, 0), end=None):
    '''
        
    '''
    (cycle_begin, cycle_end) = cycle
    (major, minor) = begin
    (end_major, end_minor) = end if end is not None else (None, None)

    while True:
        if end is not None and (major > end_major or (major == end_major and minor > end_minor)):
            return
        yield (major, minor)
        minor += step
        if minor > cycle_end:
            major += 1
            minor = cycle_begin
10460
public IRingSet findEssentialRings() {
        if (atomContainer == null) {
            return null;
        }
        IRingSet ringSet = toRingSet(atomContainer, cycleBasis().essentialCycles());
        //		atomContainer.setProperty(CDKConstants.ESSENTIAL_RINGS, ringSet);
        return ringSet;
    }
604244
def set(self, r, g, b, intensity=None):
        """"""
        self.r = r
        self.g = g
        self.b = b
        if intensity:
            self.intensity = intensity
752637
def set_symbol(self, symbol):
        """"""
        raise "Deprecated"
        self.symbol, self.bondtype, bondorder, self.equiv_class = \
                     BONDLOOKUP[symbol]
        if self.bondtype == 4:
            self.aromatic = 1
        else:
            self.aromatic = 0
801653
function onCycle(cycle, opts) {
  let hz = Math.round(cycle.hz).toLocaleString()
  let rme = '\xb1' + cycle.stats.rme.toFixed(2) + '%'

  // add colors
  hz = color(34) + hz + color(0)
  rme = color(33) + rme + color(0)

  const padding = ' '.repeat(opts.width - cycle.name.length)
  console.log(`${cycle.name}${padding}  ${hz} ops/sec  ${rme}`)
}