#fid_out.write("# Time(ps)\tAverage lipid per area\n"); psf = '{0}{1}'.format(base_path, structure_file); flg_top = 0; # check bi/mono layer flg_btm = 0; # check bi/mono layer timeStamp = []; # time stamp for trajectory # data based on trajectory STMP = []; #creating BIN 0~90 degree BIN = []; DIST = []; topDIST = []; btmDIST = []; for ibin in stanalyzer.frange(0, 90, 0.1): BIN.append(ibin); DIST.append(0.0); topDIST.append(0.0); btmDIST.append(0.0); trj_cnt = 0; for idx in range(len(trajectoryFile)): print "[{0}/{1}] trajectory is processing...".format(idx+1, len(trajectoryFile)); cnt = 0; # turning on periodic boundary conditions MDAnalysis.core.flags['use_periodic_selections'] = True MDAnalysis.core.flags['use_KDTree_routines'] = False # reading trajectory trj = '{0}{1}'.format(base_path, trajectoryFile[idx]);
elif cntAxs == 'y': top_cut = sysY * 0.165; btm_cut = -1.0 * top_cut; top_selQry = "{} and (prop y > {})".format(selQry, top_cut); btm_selQry = "{} and (prop y < {})".format(selQry, btm_cut); else: top_cut = sysZ * 0.165; btm_cut = -1.0 * top_cut; top_selQry = "{} and (prop z > {})".format(selQry, top_cut); btm_selQry = "{} and (prop z < {})".format(selQry, btm_cut); # augumented X axis BIN_X = []; min_x = math.floor(0.5 * -sysX) - 5.0; max_x = math.ceil(0.5 * sysX) + 5.0; for i in stanalyzer.frange(min_x, max_x, binsize): BIN_X.append(i); BIN_Y = []; min_y = math.floor(0.5 * -sysY) - 5.0; max_y = math.ceil(0.5 * sysY) + 5.0; for i in stanalyzer.frange(min_y, max_y, binsize): BIN_Y.append(i); BIN_top = []; BIN_btm = []; for i in BIN_X: for j in BIN_Y: tmp = [i,j, 0.0]; BIN_top.append(tmp); BIN_btm.append(tmp);
flg_top = 0 # check bi/mono layer flg_btm = 0 # check bi/mono layer timeStamp = [] # time stamp for trajectory # data based on trajectory STMP = [] #creating BIN 0~90 degree BIN = [] DIST = [] topDIST = [] btmDIST = [] for ibin in stanalyzer.frange(0, 90, 0.1): BIN.append(ibin) DIST.append(0.0) topDIST.append(0.0) btmDIST.append(0.0) trj_cnt = 0 for idx in range(len(trajectoryFile)): print "[{0}/{1}] trajectory is processing...".format( idx + 1, len(trajectoryFile)) cnt = 0 # turning on periodic boundary conditions MDAnalysis.core.flags['use_periodic_selections'] = True MDAnalysis.core.flags['use_KDTree_routines'] = False # reading trajectory
btm_selQry1 = "{} and (prop y < {})".format(selQry1, btm_cut); btm_selQry2 = "{} and (prop y < {})".format(selQry2, btm_cut); else: top_cut = sysZ * 0.165; btm_cut = -1.0 * top_cut; top_selQry1 = "{} and (prop z > {})".format(selQry1, top_cut); top_selQry2 = "{} and (prop z > {})".format(selQry2, top_cut); btm_selQry1 = "{} and (prop z < {})".format(selQry1, btm_cut); btm_selQry2 = "{} and (prop z < {})".format(selQry2, btm_cut); #----- creating BIN for distance density min_bin = 1.0; max_bin = math.sqrt(augX * augX + augY * augY + augY * augY); BIN = []; for i in stanalyzer.frange(min_bin, max_bin, binsize): BIN.append(i); #----- calculating denominator for density distribution DEN = []; topDNST = []; btmDNST = []; pre_out = 0.0; for i in range(len(BIN)): if i == 0: sp_out = 4.0/3.0 * math.pi * (BIN[i]**3); sp_in = 0.0; vol = sp_out - sp_in; pre_out = sp_out; else: sp_out = 4.0/3.0 * math.pi * (BIN[i]**3); sp_in = pre_out; vol = sp_out - sp_in;
btm_selQry1 = "{} and (prop y < {})".format(selQry1, btm_cut) btm_selQry2 = "{} and (prop y < {})".format(selQry2, btm_cut) else: top_cut = sysZ * 0.165 btm_cut = -1.0 * top_cut top_selQry1 = "{} and (prop z > {})".format(selQry1, top_cut) top_selQry2 = "{} and (prop z > {})".format(selQry2, top_cut) btm_selQry1 = "{} and (prop z < {})".format(selQry1, btm_cut) btm_selQry2 = "{} and (prop z < {})".format(selQry2, btm_cut) #----- creating BIN for distance density min_bin = 1.0 max_bin = math.sqrt(augX * augX + augY * augY + augY * augY) BIN = [] for i in stanalyzer.frange(min_bin, max_bin, binsize): BIN.append(i) #----- calculating denominator for density distribution DEN = [] topDNST = [] btmDNST = [] pre_out = 0.0 for i in range(len(BIN)): if i == 0: sp_out = 4.0 / 3.0 * math.pi * (BIN[i]**3) sp_in = 0.0 vol = sp_out - sp_in pre_out = sp_out else: sp_out = 4.0 / 3.0 * math.pi * (BIN[i]**3)