3 from __future__
import print_function
5 from IMP
import ArgumentParser
7 __doc__ =
"Write output models as PDB files."
12 desc =
"""Write output models."""
13 p = ArgumentParser(description=desc)
14 p.add_argument(
"-m",
"--max", type=int, dest=
"max", default=
None,
15 help=
"maximum number of models to write")
16 p.add_argument(
"assembly_file", help=
"assembly file name")
17 p.add_argument(
"proteomics_file", help=
"proteomics file name")
18 p.add_argument(
"mapping_file", help=
"mapping file name")
19 p.add_argument(
"combinations_file", help=
"combinations file name")
20 p.add_argument(
"model_prefix", help=
"model output file name prefix")
24 def run(asmb_fn, proteomics_fn, mapping_fn, combs_fn, model_output, max_comb):
34 mhs = ensmb.get_molecules()
35 print(
"number of combinations:", len(combs), max_comb)
36 for i, comb
in enumerate(combs[:max_comb]):
39 ensmb.load_combination(comb)
40 print(model_output +
"." + str(i) +
".pdb")
42 ensmb.unload_combination(comb)
47 run(args.assembly_file, args.proteomics_file, args.mapping_file,
48 args.combinations_file, args.model_prefix, args.max)
50 if __name__ ==
"__main__":
void write_pdb(const Selection &mhd, TextOutput out, unsigned int model=1)
SettingsData * read_settings(const char *filename)
ProteinsAnchorsSamplingSpace read_protein_anchors_mapping(multifit::ProteomicsData *prots, const std::string &anchors_prot_map_fn, int max_paths=INT_MAX)
Class for storing model, its restraints, constraints, and particles.
Ensemble * load_ensemble(multifit::SettingsData *sd, Model *mdl, const ProteinsAnchorsSamplingSpace &mapping_data)
Fitting atomic structures into a cryo-electron microscopy density map.
ProteomicsData * read_proteomics_data(const char *proteomics_fn)
Proteomics reader.
IntsList read_paths(const char *txt_filename, int max_paths=INT_MAX)
Read paths.