Beispiel #1
0
def run_():
    dirname = os.getcwd().partition('/')[-1]
    print "Starting:",dirname.split('/')[-1]
    #initial file
    dirname = os.getcwd().partition('/')[-1]
    print "Starting:",dirname.split('/')[-1]
    delta = 10
    M=MD.ReadCord()
    Lx = M.box_length
    Ly = M.box_length_y
    Lz = M.box_length_z
    L = np.array([Lx, Ly, Lz])
    L_cont = M.box_volume()
    last = M.frames
    x, xcount = util.get_box_size_steps(L_cont)
    #x_set = [450,820,1240,2050,2445,2862,3268,3674,4080,
    #         4486,4892,5298,5704,6110]
    #x_set = [50,70,90,110,130]
    #x_set = [50,70,90]
    #x_set = [25, 45, 65, 90, 110, 130, 150, 170, 190, 220, 230,
    #        250,270,290,310]
    #x_set = [25, 45, 65, 90, 110, 130, 150]
    x_set = []
    n_frames = []
    for i in range(len(xcount)):
        if xcount[i] > 10:
            x_set.append(x[i]+10)
            n_frames.append(xcount[i]-10)
    polymer_end_2_end(M, L_cont, x_set)
Beispiel #2
0
def run_():
    dirname = os.getcwd().partition('/')[-1]
    print "Starting:",dirname.split('/')[-1]
    #initial file
    dirname = os.getcwd().partition('/')[-1]
    print "Starting:",dirname.split('/')[-1]
    delta = 10
    M=MD.ReadCord()
    Lx = M.box_length
    Ly = M.box_length_y
    Lz = M.box_length_z
    L = np.array([Lx, Ly, Lz])
    L_cont = M.box_volume()
    last = M.frames
    x, xcount = util.get_box_size_steps(L_cont)
    x_set = []
    n_frames = []
    for i in range(len(xcount)):
        if xcount[i] > 10:
            x_set.append(x[i]+10)
            n_frames.append(xcount[i]-10)
    print x_set
    polymer_end_2_end(M, L_cont, x_set)
Beispiel #3
0
def run_():
    #setp
    dirname = os.getcwd().partition('/')[-1] 
    print "Starting:",dirname.split('/')[-1]
    M=MD.ReadCord()
    Lx = M.box_length
    Ly = M.box_length_y
    Lz = M.box_length_z
    L = np.array([Lx, Ly, Lz])
    L_cont = M.box_volume()
    L_cont[-1] =L_cont[-2]
    last = M.frames
    new = False
    try:
        V = util.pickle_load('V.pkl')
        if V.shape[0] != last:
            print 'generating new pickle'
            asdf
        #Z = util.pickle_load('Z.pkl')
    except:
        #V=M.cord_auto(['V','W'])
        new = True
        V=M.cord_auto(['V'])
        if V.shape[1] < 1:
            V=M.cord_auto(['A','A0','A1'])
        #Z=M.cord_auto(['Z'])
        #VW_index=M.get_names(['V','W'])
        #Z_index=M.get_names(['Z'])
        #V = drift_remove(V,L,VW_index)
        #Z = drift_remove(Z,L,Z_index)
        #dump_xyz(V)
        #dump_xyz(Z)
        util.pickle_dump(V,'V.pkl')
        #util.pickle_dump(Z,'Z.pkl')
    # if (os.path.isfile('msd.pkl') is False):
    #    msd(V,L)
    print V
    asdf
    x, xcount = util.get_box_size_steps(L_cont)
    print x
    x_set = []
    n_frames = []
    print xcount
    print x
    #F = filter(lambda x: x > 10, xcount)
    for i in range(len(xcount)):
        if xcount[i] > 10:
            x_set.append(x[i])
            n_frames.append(xcount[i]-10)
    print n_frames
    print x_set

    f = h5py.File('../pmf_dist.hdf5','w')
    for j,i in enumerate(x_set):
        if  i + n_frames[j] <= V.shape[0]:
            if L_cont[i] == L_cont[i+n_frames[j]]:
                print "L = ",L_cont[i][0]
                print "rho = ",V.shape[1]/L_cont[i][0]**3
                print "frame = ", i 
                print "n_frame", n_frames[j]
                PMF(f, V,L_cont[i],n_start=i,n_frames=n_frames[j])
            else:
                print "L is not the same reduce the n_frames"
    f.close()