We have reported HTA, an algorithm for assigning head and tail atoms in monomer SMILES based on the reactivity of their functional groups. In a reference data set of monomer SMILES, the HTA algorithm has correctly predicted the polymer class with an accuracy of 99%. The head and tail atoms were correctly assigned with an accuracy of 91%.