import numpy
from chemsh import *

numpy.set_printoptions(threshold=10)

p1bdg = Fragment(coords='1bdg.pdb')

p1bdg.save('1bdg_chemsh.pdb')

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

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

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

qm_region = [3362,3363,3364,3365,3366]

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=p1bdg,
           )

qmmm.qm.frag.save('qm_only.xyz')

sp = SP(theory=qmmm).run(dryrun=True)
