"vscode:/vscode.git/clone" did not exist on "d5fe59fe6168b4e36dd7ae81bedd3bc15a5dfdf3"
test_utils.py 335 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import unittest
import torchani


class TestUtils(unittest.TestCase):

    def testChemicalSymbolsToInts(self):
        str2i = torchani.utils.ChemicalSymbolsToInts('ABCDEF')
        self.assertEqual(len(str2i), 6)
        self.assertListEqual(str2i('BACCC').tolist(), [1, 0, 2, 2, 2])


if __name__ == '__main__':
    unittest.main()