How to use the lightdock.gso.parameters.GSOParameters function in lightdock

To help you get started, we’ve selected a few lightdock examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brianjimenez / lightdock / bin / simulation / docking_multiprocessing.py View on Github external
def set_gso(number_of_glowworms, adapters, scoring_functions, initial_positions, seed,
            step_translation, step_rotation, configuration_file=None, 
            use_anm=False, nmodes_step=0.1, anm_rec=DEFAULT_NMODES_REC, anm_lig=DEFAULT_NMODES_LIG,
            local_minimization=False):
    """Creates a lightdock GSO simulation object"""

    bounding_box = get_default_box(use_anm, anm_rec, anm_lig)

    random_number_generator = MTGenerator(seed)
    if configuration_file:
        gso_parameters = GSOParameters(configuration_file)
    else:
        gso_parameters = GSOParameters()
    builder = LightdockGSOBuilder()
    if not use_anm:
        anm_rec = anm_lig = 0
    gso = builder.create_from_file(number_of_glowworms, random_number_generator, gso_parameters,
                                   adapters, scoring_functions, bounding_box, initial_positions,
                                   step_translation, step_rotation, nmodes_step, local_minimization,
                                   anm_rec, anm_lig)
    return gso
github brianjimenez / lightdock / bin / simulation / docking_multiprocessing.py View on Github external
def set_gso(number_of_glowworms, adapters, scoring_functions, initial_positions, seed,
            step_translation, step_rotation, configuration_file=None, 
            use_anm=False, nmodes_step=0.1, anm_rec=DEFAULT_NMODES_REC, anm_lig=DEFAULT_NMODES_LIG,
            local_minimization=False):
    """Creates a lightdock GSO simulation object"""

    bounding_box = get_default_box(use_anm, anm_rec, anm_lig)

    random_number_generator = MTGenerator(seed)
    if configuration_file:
        gso_parameters = GSOParameters(configuration_file)
    else:
        gso_parameters = GSOParameters()
    builder = LightdockGSOBuilder()
    if not use_anm:
        anm_rec = anm_lig = 0
    gso = builder.create_from_file(number_of_glowworms, random_number_generator, gso_parameters,
                                   adapters, scoring_functions, bounding_box, initial_positions,
                                   step_translation, step_rotation, nmodes_step, local_minimization,
                                   anm_rec, anm_lig)
    return gso
github brianjimenez / lightdock / bin / simulation / relightdock.py View on Github external
num_glowworms = len(translations)
    log.info("%d glowworms loaded" % num_glowworms)

    adapter = DFIREAdapter(receptor, ligand)
    scoring_function = DFIRE()
    log.info("Loaded DFIRE scoring function")

    bounding_box = BoundingBox([Boundary(-MAX_TRANSLATION, MAX_TRANSLATION),
                                Boundary(-MAX_TRANSLATION, MAX_TRANSLATION),
                                Boundary(-MAX_TRANSLATION, MAX_TRANSLATION),
                                Boundary(-MAX_ROTATION, MAX_ROTATION),
                                Boundary(-MAX_ROTATION, MAX_ROTATION),
                                Boundary(-MAX_ROTATION, MAX_ROTATION),
                                Boundary(-MAX_ROTATION, MAX_ROTATION)])
    random_number_generator = MTGenerator(GSO_SEED)
    gso_parameters = GSOParameters(configuration_file)
    log.info("Parameters read")

    positions = []
    for i in range(num_glowworms):
        coordinates = [translations[i][0], translations[i][1], translations[i][2], rotations[i].w, rotations[i].x, rotations[i].y, rotations[i].z]
        positions.append(DockingLandscapePosition(scoring_function, coordinates, adapter.receptor_model, adapter.ligand_model))
    log.info("%d positions loaded" % len(positions))

    swarm = Swarm(positions, gso_parameters)
    for i, glowworm in enumerate(swarm.glowworms):
        glowworm.luciferin = luciferin[i]
        glowworm.vision_range = vision_range[i]
        glowworm.scoring = scoring[i]
    for i, glowworm in enumerate(swarm.glowworms):
        glowworm.search_neighbors(swarm.glowworms)
    log.info("Swarm created")
github brianjimenez / lightdock / bin / simulation / docking_mpi.py View on Github external
def set_gso(number_of_glowworms, adapters, scoring_functions, initial_positions, seed,
            step_translation, step_rotation, configuration_file=None, 
            use_anm=False, nmodes_step=0.1, anm_rec=DEFAULT_NMODES_REC, anm_lig=DEFAULT_NMODES_LIG,
            local_minimization=False):
    """Creates a lightdock GSO simulation object"""

    bounding_box = get_default_box(use_anm, anm_rec, anm_lig)

    random_number_generator = MTGenerator(seed)
    if configuration_file:
        gso_parameters = GSOParameters(configuration_file)
    else:
        gso_parameters = GSOParameters()
    builder = LightdockGSOBuilder()
    if not use_anm:
        anm_rec = anm_lig = 0
    gso = builder.create_from_file(number_of_glowworms, random_number_generator, gso_parameters,
                                   adapters, scoring_functions, bounding_box, initial_positions,
                                   step_translation, step_rotation, nmodes_step, local_minimization)
    return gso
github brianjimenez / lightdock / bin / simulation / docking_mpi.py View on Github external
def set_gso(number_of_glowworms, adapters, scoring_functions, initial_positions, seed,
            step_translation, step_rotation, configuration_file=None, 
            use_anm=False, nmodes_step=0.1, anm_rec=DEFAULT_NMODES_REC, anm_lig=DEFAULT_NMODES_LIG,
            local_minimization=False):
    """Creates a lightdock GSO simulation object"""

    bounding_box = get_default_box(use_anm, anm_rec, anm_lig)

    random_number_generator = MTGenerator(seed)
    if configuration_file:
        gso_parameters = GSOParameters(configuration_file)
    else:
        gso_parameters = GSOParameters()
    builder = LightdockGSOBuilder()
    if not use_anm:
        anm_rec = anm_lig = 0
    gso = builder.create_from_file(number_of_glowworms, random_number_generator, gso_parameters,
                                   adapters, scoring_functions, bounding_box, initial_positions,
                                   step_translation, step_rotation, nmodes_step, local_minimization)
    return gso