示例#1
0
    err1 = rmse(fce0,fce1)
    q1 = uqi(fce0,fce1)
    err2 = rmse(fce0,fce2)
    q2 = uqi(fce0,fce2)
    axarr[1,0].scatter(fce0, fce1,c='blue')
    axarr[1,0].scatter(fce0, fce2,c='red')
    axarr[1,0].set_xlabel('qF:rmse=%.4f, uqi=%.4f\nmmF:rmse=%.4f, uqi=%.4f'%(err1,q1,err2,q2))
    
    err1 = rmse(trq0,trq1)
    q1 = uqi(trq0,trq1)
    err2 = rmse(trq0,trq2)
    q2 = uqi(trq0,trq2)
    axarr[1,1].scatter(trq0, trq1,c='blue')
    axarr[1,1].scatter(trq0, trq2,c='red')
    axarr[1,1].set_xlabel('qT:rmse=%.4f, uqi=%.4f\nmmT:rmse=%.4f, uqi=%.4f'%(err1,q1,err2,q2))
    plt.savefig('corr.png')


if __name__ == '__main__':
    order = 3
    calculator = EFT_calculator(order)
    t0 = time()
    cc = Classical_calculator()
    #acalculator.setup('grid_data.txt')
    calculator.setup('grid.dat')
    #calculator.fill_grid(cc)
    t1 = time()
    print 'took %.1f s to fill the grid' % (t1 - t0)
    test_random_set(sys.argv[1]) # a file with a list of location of QM .log file

示例#2
0
 $SYSTEM MWORDS=500 MEMDDI=500 $END
-$CONTRL EXETYP=CHECK $END
 $CONTRL MAXIT=200 $END
-$STATPT OPTTOL=1.0E-5 $END
-$STATPT NSTEP=300 $END
-$DFT NTHE=36 NPHI=72 $END
 $SCF DIRSCF=.T. $END
 $BASIS GBASIS=N311 NGAUSS=6 NDFUNC=2 NPFUNC=2 DIFFSP=.T. DIFFS=.T. $END
 $GUESS GUESS=HUCKEL $END
 $DATA
--Cartesian coordinates with C1 symmetry as follows:
C1
"""

calculator = EFT_calculator()
calculator.setup()
# Please change the following code to whatever needed to generate the input
# coordinates files
# Please make sure to carry the id number along with the results
root = 'pdbRQ.dat'
if not os.path.exists(root): os.mkdir(root)


def mol2mol_init(ele):
    mol = [[i, 0.0, 0.0, 0.0] for i in ele]
    return mol


size = 200
folder_id = 0
file_count = 0
示例#3
0
    #for i in range(2, 3):
        name = 'test%04d.inp' % i
        coors = load_coordinates(name)
        eft = calculator.eval(coors[:3], coors[3:])
        Ofile.write('%s %12.7f\n'%(name, eft[0]))
        Ofile.flush()
        fout1.write('%s %12.7f %12.7f %12.7f\n'%(name, eft[1], eft[2], eft[3]))
        fout1.flush()
        fout2.write('%s %12.7f %12.7f %12.7f\n'%(name, eft[4], eft[5], eft[6]))
        fout2.flush()
        ener.append(eft[0])
        force.append(eft[1:4])
        torque.append(eft[4:7])
    t1 = time()
    print 'took %.1f s to evaluate the random set' % (t1 - t0)
    Ofile.close()
    fout1.close()
    fout2.close()
    return ener, force, torque


if __name__ == '__main__':
    order = 2
    calculator = EFT_calculator(order)
    t0 = time()
    calculator.setup('grid.dat')
    t1 = time()
    print 'took %.1f s to fill the grid' % (t1 - t0)
    ener, force, torque = test_random_set()