Exemplo n.º 1
0
    return job_dict._getvalue()


def use_single_processor(settings, pdb_monomers, input_pdb_dir_path, pdb_data_dir, mutfile_data_dir, dataset_cases_by_pdb_chain):
    job_dict = {}
    for keypair in pdb_monomers:
        pdb_dir_path = os.path.join(input_pdb_dir_path, '%s.pdb' % keypair[0])
        create_input_files(job_dict, settings, pdb_dir_path, pdb_data_dir, mutfile_data_dir, keypair, dataset_cases_by_pdb_chain[keypair])
    sys.stdout.write('\n')
    return job_dict


if __name__ == '__main__':
    import pprint
    try:
        arguments = docopt.docopt(__doc__.format(**locals()))
    except Exception, e:
        print('Failed while parsing arguments: %s.' % str(e))
        sys.exit(1)

    # Set the PDB input path
    input_pdb_dir_path = '../../input/pdbs'

    # Read the settings file
    settings = rosetta.parse_settings.get_dict()

    # Read in the dataset file
    dataset_filepath = arguments['--dataset'][0]
    dataset_filename = os.path.splitext(os.path.split(dataset_filepath)[1])[0]
    if not os.path.exists(dataset_filepath):
        raise Exception('The dataset file %s does not exist.' % dataset_filepath)
Exemplo n.º 2
0
        f.write("%d%s %s PIKAA A\n" % (pdb_res, insertion_code, chain))


def make_pack_resfile(pack_resfile_path, close_residues_list):
    with open(pack_resfile_path, "w") as f:
        f.write(resfile_start)
        for atom_resnum, atom_insertion_code, atom_chain in close_residues_list:
            f.write("%d%s %s NATAA\n" %
                    (atom_resnum, atom_insertion_code, atom_chain))


if __name__ == "__main__":
    import pprint

    try:
        arguments = docopt.docopt(__doc__.format(**locals()))
    except Exception as e:
        print(("Failed while parsing arguments: %s." % str(e)))
        sys.exit(1)

    if arguments.get("--output_directory"):
        job_output_directory = arguments["--output_directory"][0]
        if not (os.path.exists(job_output_directory)):
            raise Exception(
                "The specified output directory %s does not exist." %
                output_dir)

    if arguments.get("--extra_name"):
        extra_name = arguments["--extra_name"][0]

    if arguments.get("--number_repeats"):