Example #1
0
def main():

    ### get the data folder

    parser = argparse.ArgumentParser()
    parser.add_argument("-fl", "--folder", \
                        help="Folder containing data, as in /local/duman/SIMULATIONS/Cells_in_LAMMPS/.../")
    parser.add_argument("-sb", "--savebase", nargs="?", \
                        const = "/usr/users/iff_th2/duman/Cells_in_LAMMPS/MOVIES/", \
                        help="Folder to save the data, as in /usr/users/iff_th2/duman/Cells_in_LAMMPS/MOVIES/")
    parser.add_argument("-ti","--init_time", nargs="?", const=10, type=int, \
                        help="First frame of the video (in terms of frame number), you can also leave it empty")
    parser.add_argument("-tf","--fin_time", nargs="?", const=2000, type=int, \
                        help="Last frame of the video (in terms of frame number), you can also leave it empty")
    parser.add_argument("-s",
                        "--save_eps",
                        action="store_true",
                        help="Decide whether to save in eps or not")
    args = parser.parse_args()

    ### read the data and general information from the folder

    sim, cells, beads = read_write.read_h5_file(args.folder)
    beads.get_img_pos(sim.lx)
    print "folder = ", args.folder

    ### plot the data in the given time window

    plot_frames(beads, sim, args.init_time, args.fin_time, args.savebase,
                args.save_eps)

    return
Example #2
0
def main():

    ### get the command line arguments

    args = get_args()

    ### read the data and general information from the folder

    beads, pols, sim = read_write.read_h5_file(args.folder)
    print "folder = ", args.folder

    print "Calculating image positions of beads"
    beads.xi = misc_tools.get_img_pos(beads.xu, sim.lx)

    if args.colorid == "orient":
        print "Calculating bond orientations"
        beads.calc_bond_orientations(beads.xu, \
                        sim.nsteps, sim.nbeads, sim.npols, sim.nbpp)
    elif args.colorid == "id":
        print "Generating polymer identities of beads"
        beads.get_pol_ids(sim.nbeads, sim.nbpp)

    ### plot the data in the given time window

    plot_frames(beads, sim, args.init_time, args.fin_time, \
                args.savebase, args.colorid)

    return
Example #3
0
def main():

    ### get the data folder
    
    parser = argparse.ArgumentParser()
    parser.add_argument("-fl", "--folder", \
                        help="Folder containing data, as in /local/duman/SIMULATIONS/Cells_in_LAMMPS/.../")
    parser.add_argument("-sb", "--savebase", nargs="?", \
                        const = "/usr/users/iff_th2/duman/Cells_in_LAMMPS/DATA/", \
                        help="Folder to save the data, as in /usr/users/iff_th2/duman/Cells_in_LAMMPS/DATA/") 
    parser.add_argument("-sf", "--savefolder", nargs="?", \
                        const='Overlap_fnc', \
                        help="Specific folder for saving, as in Overlap_fnc")     
    parser.add_argument("-b","--bending", action="store_true", help="Decide whether to include bending or not")                    
    parser.add_argument("-s","--save_eps", action="store_true", help="Decide whether to save in eps or not") 
    args = parser.parse_args()
    
    ### read the data and general information from the folder
    
    sim, cells, beads = read_write.read_h5_file(args.folder, args.bending)
    print "folder = ", args.folder, " bending rigidity = ", sim.kappa
        
    ### calculate the 4 point susceptibility of displacements of the centre of mass of cells

    threshold_amplitude = 7.0
    delay, suscp = calc_4_pt_suscp(cells.xu, sim, threshold_amplitude)
    
    ### write the 4 point susceptibility data to the corresponding file
    
    read_write.write_2d_analysis_data(delay, suscp, args.savebase, args.savefolder, sim, args.bending)
    
    return
Example #4
0
def main():

    ### get the data folder

    parser = argparse.ArgumentParser()
    parser.add_argument("-fl", "--folder", \
                        help="Folder containing data, as in /local/duman/SIMULATIONS/Cells_in_LAMMPS/.../")
    parser.add_argument("-sb", "--savebase", nargs="?", \
                        const = "/usr/users/iff_th2/duman/Cells_in_LAMMPS/PLOTS/", \
                        help="Folder to save the data, as in /usr/users/iff_th2/duman/Cells_in_LAMMPS/PLOTS/")
    parser.add_argument("-sf", "--savefolder", nargs="?", const="TRAJECTORY", \
                        help="Specific folder for saving, as in TRAJECTORY")
    parser.add_argument("-ti","--init_time", nargs="?", const=10, type=int, \
                        help="First frame of the trajectory, you can also leave it empty")
    parser.add_argument("-tf","--fin_time", nargs="?", const=2000, type=int, \
                        help="Last frame of the trajectory, you can also leave it empty")
    parser.add_argument("-s",
                        "--save_eps",
                        action="store_true",
                        help="Decide whether to save in eps or not")
    args = parser.parse_args()

    ### read the data and general information from the folder

    sim, cells, beads = read_write.read_h5_file(args.folder)
    print "folder = ", args.folder, "cells.xu = \n", cells.xu

    ### plot the data in the given time window

    plot_traj(cells.xu, sim, args.init_time, args.fin_time, \
              args.savebase, args.savefolder, args.save_eps)

    return
def main():

    ### get the data folder

    parser = argparse.ArgumentParser()
    parser.add_argument("-e", "--eps", type=float, nargs="?", const=-1, \
                        help="Strength of LJ potential")
    parser.add_argument("-f", "--fp", type=float, nargs="?", const=-1, \
                        help="Propulsion force")
    parser.add_argument("-a", "--areak", type=float, nargs="?", const=-1, \
                        help="Area constraint potential strength")
    parser.add_argument("-fl", "--folder", nargs="?", \
                        const='/local/duman/SIMULATIONS/Cells_in_LAMMPS/density_0.8/', \
                        help="Folder containing data, as in /local/duman/SIMULATIONS/Cells_in_LAMMPS/density_0.8/")
    parser.add_argument("-sb", "--savebase", nargs="?", \
                        const = "/usr/users/iff_th2/duman/Cells_in_LAMMPS/PLOTS/", \
                        help="Folder to save the data, as in /usr/users/iff_th2/duman/Cells_in_LAMMPS/PLOTS/")
    parser.add_argument("-sf", "--savefolder", nargs="?", const="Vorticity_field", \
                        help="Specific folder for saving, as in Vorticity_field")
    parser.add_argument("-ti","--init_time", nargs="?", const=10, type=int, \
                        help="First frame of the video (in terms of frame number), you can also leave it empty")
    parser.add_argument("-tf","--fin_time", nargs="?", const=1000, type=int, \
                        help="Last frame of the video (in terms of frame number), you can also leave it empty")
    parser.add_argument("-s",
                        "--save_eps",
                        action="store_true",
                        help="Decide whether to save in eps or not")
    args = parser.parse_args()

    ### read the data and general information from the folder

    folder = args.folder + "eps_" + str(args.eps) + "/fp_" + str(args.fp) + \
        "/areak_" + str(args.areak) + "/"
    sim, cells, beads = read_write.read_h5_file(folder)
    beads.get_img_pos(sim.lx)
    cells.get_img_pos(sim.lx)
    print "folder = ", args.folder

    ### read the vorticity data

    analysisdatabase = '/usr/users/iff_th2/duman/Cells_in_LAMMPS/DATA/'
    analysisdatabase += args.savefolder + '/'
    datafolder, analysisfile = read_write.gen_folders(args.eps, args.fp, args.areak, \
                                                      args.savefolder, args.folder, \
                                                      analysisdatabase)

    sim = read_write.read_sim_info(datafolder)
    data = read_write.read_multid_analysis_data(analysisfile)

    ### plot the data in the given time window

    savebase = args.savebase + args.savefolder + "/"
    os.system("mkdir -p " + savebase)
    plot_vorticity(data, beads, cells, sim, args.init_time, args.fin_time,
                   savebase, args.save_eps)

    return
Example #6
0
def main():

    ### get the data folder

    parser = argparse.ArgumentParser()
    parser.add_argument("-fl", "--folder", \
                        help="Folder containing data, as in /local/duman/SIMULATIONS/Cells_in_LAMMPS/.../")
    parser.add_argument("-sb", "--savebase", nargs="?", \
                        const = "/usr/users/iff_th2/duman/Cells_in_LAMMPS/DATA/", \
                        help="Folder to save the data, as in /usr/users/iff_th2/duman/Cells_in_LAMMPS/DATA/")
    parser.add_argument("-sf", "--savefolder", nargs="?", \
                        const="MSD", \
                        help="Specific folder for saving, as in MSD")
    parser.add_argument("-b",
                        "--bending",
                        action="store_true",
                        help="Decide whether to include bending or not")
    parser.add_argument("-s",
                        "--save_eps",
                        action="store_true",
                        help="Decide whether to save in eps or not")
    args = parser.parse_args()

    ### read the data and general information from the folder

    sim, cells, beads = read_write.read_h5_file(args.folder, args.bending)
    print "folder = ", args.folder, " bending rigidity = ", sim.kappa

    ### calculate MSD of the centre of mass of cells

    delay, msd = calculate_drift_subtracted_MSD(cells.xu, sim)
    print "folder = ", args.folder

    ### write the MSD data to the corresponding file

    read_write.write_2d_analysis_data(delay, msd, args.savebase,
                                      args.savefolder, sim, args.bending)

    return
def main():

    ### get the data folder

    parser = argparse.ArgumentParser()
    parser.add_argument("-fl", "--folder", \
                        help="Folder containing data, as in /local/duman/SIMULATIONS/Cells_in_LAMMPS/.../")
    parser.add_argument("-sb", "--savebase", nargs="?", \
                        const = "/usr/users/iff_th2/duman/Cells_in_LAMMPS/DATA/", \
                        help="Folder to save the data, as in /usr/users/iff_th2/duman/Cells_in_LAMMPS/DATA/")
    parser.add_argument("-sf", "--savefolder", nargs="?", \
                        const="Empty_space", \
                        help="Specific folder for saving, as in Empty_space")
    parser.add_argument("-b",
                        "--bending",
                        action="store_true",
                        help="Decide whether to include bending or not")
    args = parser.parse_args()

    ### read the data and general information from the folder

    sim, cells, beads = read_write.read_h5_file(args.folder, args.bending)
    cells.get_img_pos(sim.lx)
    beads.get_img_pos(sim.lx)
    print "folder = ", args.folder

    ### calculate the empty spaces

    empty_space_ratio = calc_empty_space_ratio(beads.xi, cells.xi, cells.nbpc,
                                               sim)
    print "folder = ", args.folder

    ### write the data to the corresponding file

    read_write.write_single_analysis_data(empty_space_ratio, args.savebase,
                                          args.savefolder, sim, args.bending)

    return