Exemple #1
0
        help='Number of thread-MPI threads to start, default=0',
        type=float,
        default=0)
    parser.add_argument('-gpu_id',
                        action="store",
                        dest="gpuid",
                        help='List of GPU device id-s to use, default=\"\" ',
                        default="None")
    return parser


if __name__ == "__main__":

    my_parser = parser_input()
    args = my_parser.parse_args()

    dt = args.dt
    nsteps = 1000 * args.time / dt

    sys_prod = gmx.GmxSys()
    sys_prod.nt = args.nt
    sys_prod.ntmpi = args.ntmpi
    if args.gpuid != "None":
        sys_prod.gpu_id = args.gpuid

    sys_prod.extend_equi_prod(args.tpr, nsteps=nsteps)

    print("\n\nProduction extension was sucessfull ")

    sys_prod.display()
Exemple #2
0
    parser = argparse.ArgumentParser(description="Create the topologie file\
     from a structure pdb file")
    parser.add_argument('-f', action="store", dest="f",
                        help='Input PDB file', type=str, required=True)
    parser.add_argument('-o', action="store", dest="o",
                        help='Output directory', type=str, required=True)
    parser.add_argument('-vsite', action="store_true", dest="vsite_flag",
                        help='Use virtual site for hydrogens')

    return parser


if __name__ == "__main__":

    my_parser = parser_input()
    args = my_parser.parse_args()
    if args.vsite_flag:
        vsite = "hydrogens"
    else:
        vsite = "none"

    sys_name = args.f.split("/")[-1][:-4]

    md_sys = gmx.GmxSys(name=sys_name, coor_file=args.f)
    md_sys.prepare_top(out_folder=args.o, vsite=vsite)
    md_sys.create_box(dist=1.0, box_type="dodecahedron", check_file_out=True)

    print("\n\nTopologie creation was sucessfull \n\tTopologie directorie :\t" + args.o)

    md_sys.display()
Exemple #3
0
        do a minimisation and a vacuum equilibration")
    parser.add_argument('-seq', action="store", dest="seq",
                        help='Peptide sequence', type=str, required=True)
    parser.add_argument('-o', action="store", dest="o",
                        help='Output Directory', type=str, required=True)
    parser.add_argument('-m_steps', action="store", dest="min_steps",
                        help='Minimisation nsteps, default=1000', type=int, default=1000)
    parser.add_argument('-time', action="store", dest="time",
                        help='Vacuum equilibration time(ns), default = 1ns', type=float, default=1)

    return parser


if __name__ == "__main__":

    my_parser = parser_input()
    args = my_parser.parse_args()

    dt = 0.001
    step = 1000 * args.time / dt
    sequence = args.seq
    out_folder = args.o
    em_nsteps = args.min_steps

    peptide = gmx.GmxSys(name='pep_' + sequence)
    peptide.create_peptide(sequence=sequence, out_folder=out_folder,
                           em_nsteps=em_nsteps, equi_nsteps=step)

    print("\n\nPeptide Creation was sucessfull \n\tPeptide directorie :\t" + args.o)
    peptide.display()
Exemple #4
0
        type=float,
        default=0)
    parser.add_argument('-gpu_id',
                        action="store",
                        dest="gpuid",
                        help='List of GPU device id-s to use, default=\"\" ',
                        default="None")
    return parser


if __name__ == "__main__":

    my_parser = parser_input()
    args = my_parser.parse_args()

    sys_min = gmx.GmxSys(name=args.name, coor_file=args.f, top_file=args.p)
    sys_min.nt = args.nt
    sys_min.ntmpi = args.ntmpi
    if args.gpuid != "None":
        sys_min.gpu_id = args.gpuid

    sys_min.em_2_steps(out_folder=args.o,
                       name=args.name,
                       no_constr_nsteps=args.min_steps,
                       constr_nsteps=args.min_steps,
                       posres="",
                       create_box_flag=args.box)
    sys_min.convert_trj(traj=False)

    print("\n\nMinimisation was sucessfull \n\tMinimzed directory :\t" +
          args.o)
Exemple #5
0
    args = parser.parse_args()


    # General args:
    dt          = args.dt
    out_folder  = args.o
    sys_name    = args.name
    maxwarn     = args.maxwarn

    # Peptide args:
    sequence = args.seq
    em_nsteps = args.em_steps
    pep_step = 1000 * args.pep_time / dt

    # Create peptide:
    peptide = gmx.GmxSys(name='pep_' + sequence)
    peptide.nt = args.nt
    peptide.ntmpi = args.ntmpi
    if args.gpuid != "None":
        peptide.gpu_id = args.gpuid

    peptide.create_peptide(sequence=sequence, out_folder=out_folder + "/" + sequence,
                           em_nsteps=em_nsteps, equi_nsteps=pep_step, posre_post="_pep")
    peptide.display()

    # Starting system args:
    coor_sys = args.f_sys
    top_sys = args.p_sys
    pep_num = args.num_mol

    # Insert peptide:
Exemple #6
0
                        help='Output Directory')
    parser.add_argument('-n',
                        action="store",
                        dest="name",
                        help='Output file name')

    return parser


if __name__ == "__main__":

    my_parser = parser_input()
    args = my_parser.parse_args()

    sys_raw = gmx.GmxSys(name=args.name,
                         coor_file=args.f_sys,
                         top_file=args.p_sys)
    mol_gmx = gmx.GmxSys(name="mol", coor_file=args.f_mol, top_file=args.p_mol)

    sys_raw.display()
    mol_gmx.display()

    sys_raw.insert_mol_sys(mol_gromacs=mol_gmx,
                           mol_num=args.num_mol,
                           new_name=args.name,
                           out_folder=args.o,
                           check_file_out=True)

    print("\n\nInsertion was sucessfull \n\tSystem directory :\t" + args.o +
          "\n\tsystem coor file:\t" + sys_raw.coor_file +
          "\n\tsystem top file:\t" + sys_raw.top_file)
Exemple #7
0
    parser.add_argument('-ntmpi', action="store", dest="ntmpi",
                        help='Number of thread-MPI threads to start, default=0',
                        type=float, default=0)
    parser.add_argument('-gpu_id', action="store", dest="gpuid",
                        help='List of GPU device id-s to use, default=\"\" ', default="None")

    return parser


if __name__ == "__main__":

    my_parser = parser_input()
    args = my_parser.parse_args()

    vsite = "none"
    peptide = gmx.GmxSys(name=args.name, coor_file=args.f)
    peptide.nt = args.nt
    peptide.ntmpi = args.ntmpi
    if args.gpuid != "None":
        peptide.gpu_id = args.gpuid

    if args.cyclic_flag:
        peptide.cyclic_peptide_top(out_folder=args.out_dir + '/top')
    else:
        peptide.add_top(out_folder=args.out_dir + '/top',
                        pdb2gmx_option_dict={'vsite': 'no', 'ignh': 'yes', 'ter': 'no'})

    peptide.em(out_folder=args.out_dir + '/em', name="min_" + args.name,
               nsteps=args.min_steps, posres="", nstxout=1000, create_box_flag=True,
               constraints="none")
Exemple #8
0
    maxwarn = args.maxwarn
    min_steps = args.min_steps
    dt_HA = args.dt_HA
    dt = args.dt
    HA_step = 1000 * args.HA_time / dt_HA
    CA_step = 1000 * args.CA_time / dt
    CA_LOW_step = 1000 * args.CA_LOW_time / dt

    prot_top_folder = args.o + "/top_prot/"
    prot_min_folder = args.o + "/em_prot/"

    sys_top_folder = args.o + "/top_sys/"
    sys_em_equi_folder = args.o + "/em_equi_sys/"

    if args.p != "None":
        prot_sys = gmx.GmxSys(name=sys_name, coor_file=args.f, top_file=args.p)
    else:
        prot_sys = gmx.GmxSys(name=sys_name, coor_file=args.f)
    prot_sys.nt = args.nt
    prot_sys.ntmpi = args.ntmpi
    if args.gpuid != "None":
        prot_sys.gpu_id = args.gpuid

    if args.p == "None":
        prot_sys.prepare_top(out_folder=prot_top_folder, vsite=vsite)

    prot_sys.create_box(dist=1.0, box_type="dodecahedron", check_file_out=True)

    prot_sys.em_2_steps(out_folder=prot_min_folder,
                        name=sys_name,
                        no_constr_nsteps=min_steps,