Пример #1
0
    def test_prepare_results_environment_with_existing_data(self):
        os.chdir(self.test_path)

        prepare_results_environment(20)

        prepare_results_environment()

        assert False
Пример #2
0
    def test_prepare_results_environment(self):
        os.chdir(self.test_path)

        prepare_results_environment(20)

        directories = glob(str(self.test_path / 'swarm_*/'))

        assert len(directories) == 20
Пример #3
0
        lig_restraints = None
        try:
            lig_restraints = ligand_restraints['active'] + ligand_restraints[
                'passive']
        except:
            pass

        # Calculate surface points (swarm centers) over receptor structure
        starting_points_files = calculate_starting_positions(
            receptor, ligand, args.swarms, args.glowworms,
            args.starting_points_seed, rec_restraints, lig_restraints,
            rec_translation, lig_translation, args.ftdock_file, args.use_anm,
            args.anm_seed, args.anm_rec, args.anm_lig, args.membrane)
        if len(starting_points_files) != args.swarms:
            args.swarms = len(starting_points_files)
            log.info('Number of swarms is %d after applying restraints' %
                     args.swarms)

        # Create simulation folders
        prepare_results_environment(args.swarms)

        # Dump to a setup file the actual configuration
        create_setup_file(args)

        log.info("LightDock setup OK")

    except LightDockError, error:
        log.error("LightDock setup failed. Please see:")
        log.error(error)
Пример #4
0
        lig_restraints = None
        try:
            lig_restraints = ligand_restraints['active'] + ligand_restraints['passive']
        except:
            pass

        # Calculate surface points (swarm centers) over receptor structure
        starting_points_files = calculate_starting_positions(receptor, ligand, 
                                                             args.swarms, args.glowworms, 
                                                             args.starting_points_seed,
                                                             rec_restraints, lig_restraints,
                                                             rec_translation, lig_translation,
                                                             args.ftdock_file, args.use_anm, args.anm_seed,
                                                             args.anm_rec, args.anm_lig, args.membrane)
        if len(starting_points_files) != args.swarms:
            args.swarms = len(starting_points_files)
            log.info('Number of swarms is %d after applying restraints' % args.swarms)

        # Create simulation folders
        prepare_results_environment(args.swarms)

        # Dump to a setup file the actual configuration
        create_setup_file(args)

        log.info("LightDock setup OK")

    except LightDockError, error:
        log.error("LightDock setup failed. Please see:")
        log.error(error)