#  Test connectivity for a molecular crystal

from numpy        import array
from chemsh       import *
from chemsh.utils import testutils
from time import time

sod1 = Fragment(coords='sod1.pdb')

t1 = time()
print("### sod1.segments =", sod1.segments)
t2 = time()
print("### t1 =", time()-t1)
print("### sod1.segments =", sod1.segments)
print("### t1 =", time()-t2)

print("### nsegments =", sod1.nsegments)

#print("### sod1 Cartesians =", sod1.coords)
#sod1.save('sod1.xyz')

print("### sod1 conn =", sod1.conn)

print("### sod1 Z-matrix =", sod1.zmatrix)

#testutils.validate(sod1.conn, reference)

sod1.z2c()
print("### sod1 Cartesians =", sod1.coords)
