• First, organic cycles are replaced by a new virtual carbon atom. Afterwards, all metallic atoms are assigned to the "inorganic" class and all carbon atoms to the "organic" class. Then, in a loop, each remaining atom that is bonded to an atom in the "inorganic" class is itself classified as "inorganic", until no such atom remains. All remaining unassigned atoms are then classified as "organic". P and S atoms are treated differently and considered organic if directly bonded to a carbon, metallic if directly bonded to a metal, and part of a third class otherwise.