import numpy
from chemsh import *

numpy.set_printoptions(threshold=10)

p3nir = Fragment(coords='3nir.pdb')

p3nir.save('3ni3_chemsh.pdb')
quit()
print("### p3nir.segIDs =", p3nir.segIDs)
print("### p3nir.resIDs =", p3nir.resIDs)
print("### p3nir.segments =", p3nir.segments)

print(" >>> DL_FIELD test p3nir:\n coords =", p3nir.coords)

p3nir.cell.vectors[:,0] = [ 60.0,  0.0,  0.0 ]
p3nir.cell.vectors[:,1] = [  0.0, 60.0,  0.0 ]
p3nir.cell.vectors[:,2] = [  0.0,  0.0, 60.0 ]
print(" >>> DL_FIELD test p3nir:\n coords =", p3nir.cell.vectors)
print(" >>> DL_FIELD test p3nir:\n pbc =", p3nir.cell.pbc)

ff = DL_FIELD(ff='charmm36_prot',
              cutoff_vdw=20.0,
              pbc=None,
              frag=p3nir,
#            path_lib='/home/ylu/Programs/dl_field/4.5/lib',
#            path_sol='/home/ylu/Programs/dl_field/4.5/solvent',
             )

qm_region = range(4285,4301)

qm_theory = NWChem(method='hf', basis='3-21g')

mm_theory = DL_POLY(ff=ff)


qmmm = QMMM(qm=qm_theory,
            mm=mm_theory,
            qm_region=qm_region,
            frag=p3nir,
           )


print("### ff =", qmmm.mm.ff.fftext)
sp = SP(theory=qmmm).run(dryrun=True)
