from simtk.molmodel import Biotype, TinkerBiotypeIndex, Element, BiotypeIndex

t1 = TinkerBiotypeIndex(5)
t2 = TinkerBiotypeIndex(5)
t3 = TinkerBiotypeIndex(6)

assert t1 == 5
assert t2 == 5
assert t3 != 5

b = Biotype()

print b.getTinkerBiotypeIfAny()
print b.getIndex()
print b.getElement().getAtomicNumber()
print b.getValence()
b.setTinkerBiotypeIndex(TinkerBiotypeIndex(5))
print b.getTinkerBiotypeIfAny()
assert b.getTinkerBiotypeIfAny() == 5

print "#%s#" % b.getAtomName()
print "#%s#" % b.getResidueName()
print b.getOrdinality()

b3ix = Biotype.defineTinkerBiotype(TinkerBiotypeIndex(9), Element.Carbon(),
    4, "Arginine", "CA")

# b2 = Biotype.get(b2ix)
# bbad = Biotype.get(BiotypeIndex(45000))

b2ix = Biotype.defineBiotype(Element.Argon(), 0, "Argon", "AR")
print b2ix

print Biotype.Argon()

b = Biotype.get(b2ix)
print b
assert b.getElement() == Element.Argon()
