Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_defaultgninatyping():
m = pybel.readstring('smi','c1ccccc1CCl')
m.addh()
t = molgrid.defaultGninaLigandTyper
assert t.num_types() == 14
names = list(t.get_type_names())
assert names[2] == 'AromaticCarbonXSHydrophobe'
typs = [t.get_atom_type_index(a.OBAtom) for a in m.atoms]
assert len(typs) == 15
acnt = 0
ccnt = 0
ocnt = 0
clcnt = 0
other = 0
for t,r in typs:
if t < 0:
other += 1
continue
if names[t] == 'AromaticCarbonXSHydrophobe':
acnt += 1