Example #1
0
def create_top(o, struct, posres):
    print("attempting to auto-generate a topology...")
    
    top = md.topology(struct=struct, protein="protein", posres=posres, dirname=o)
        # topology returns:
        # {'top': '/home/andy/tmp/Au/top/system.top', 
        # 'dirname': 'top', 
        # 'posres': 'protein_posres.itp', 
        # 'struct': '/home/andy/tmp/Au/top/protein.pdb'}
        
    print("succesfully auto-generated topology")
        
    print('pwd', os.getcwd())
    print('top', top)
        

    """
Example #2
0
def create_top(o, struct, posres):
    print("attempting to auto-generate a topology...")

    top = md.topology(struct=struct,
                      protein="protein",
                      posres=posres,
                      dirname=o)
    # topology returns:
    # {'top': '/home/andy/tmp/Au/top/system.top',
    # 'dirname': 'top',
    # 'posres': 'protein_posres.itp',
    # 'struct': '/home/andy/tmp/Au/top/protein.pdb'}

    print("succesfully auto-generated topology")

    print('pwd', os.getcwd())
    print('top', top)
    """
Example #3
0
        
        # try to create an integrator
        attr(INTEGRATOR, str, integrator)
        attr(INTEGRATOR_ARGS, list, integrator_args)
        try:
            integrator_type = util.get_class(conf[INTEGRATOR])
            integrator_type(None, *conf[INTEGRATOR_ARGS])
            print("succesfully created integrator {}".format(integrator))
        except Exception, e:
            print("error creating integrator {}".format(integrator))
            raise e
        
        # make a top if we don't have one
        if top is None:
            print("attempting to auto-generate a topology...")
            with md.topology(struct=struct, protein="protein") as top:
                # topology returns:
                # {'top': '/home/andy/tmp/Au/top/system.top', 
                # 'dirname': 'top', 
                # 'struct': '/home/andy/tmp/Au/top/protein.pdb'}

                print("succesfully auto-generated topology")

                print('pwd', os.getcwd())
                print('top', top)

                filedata_fromfile(TOPOL_TOP, top["top"])
                filedata_fromfile(STRUCT_PDB, top["struct"])
                include_dirs = [os.path.abspath(top.dirname)]
                read_includes(top["top"])
                
Example #4
0
        # try to create an integrator
        attr(INTEGRATOR, str, integrator)
        attr(INTEGRATOR_ARGS, list, integrator_args)
        try:
            integrator_type = util.get_class(conf[INTEGRATOR])
            integrator_type(None, *conf[INTEGRATOR_ARGS])
            print("succesfully created integrator {}".format(integrator))
        except Exception, e:
            print("error creating integrator {}".format(integrator))
            raise e

        # make a top if we don't have one
        if top is None:
            print("attempting to auto-generate a topology...")
            with md.topology(struct=struct, protein="protein") as top:
                # topology returns:
                # {'top': '/home/andy/tmp/Au/top/system.top',
                # 'dirname': 'top',
                # 'struct': '/home/andy/tmp/Au/top/protein.pdb'}

                print("succesfully auto-generated topology")

                print('pwd', os.getcwd())
                print('top', top)

                filedata_fromfile(TOPOL_TOP, top["top"])
                filedata_fromfile(STRUCT_PDB, top["struct"])
                include_dirs = [os.path.abspath(top.dirname)]
                read_includes(top["top"])