After gathering the vocabulary, two special symbols were added: "^" and "$", which represent the beginning and end of a sequence respectively. SMILES strings were then encoded using a series of one-hot vectors, each with as many binary positions as tokens in the vocabulary. The represented token having a "1" and the rest "0". All the SMILES strings were encoded as a matrix with a "^" and "$" token added in the first and last position respectively.