20 from __future__
import print_function
28 def transform(input_pdb, input_lib, output_pdb):
31 rl.read_library_file(input_lib)
37 mh = IMP.atom.get_by_type(orig_h, IMP.atom.RESIDUE_TYPE)
41 rc.transform(orig_h, hps, 0.9, 1e-6, 6)
53 if __name__ ==
'__main__':
58 P.add_option(
'--input_pdb',
'-i', action=
'store', type=
'string',
59 help=
'input PDB file (required)')
60 P.add_option(
'--input_lib',
'-l', action=
'store', type=
'string',
61 help=
'input rotamer library file (required)')
62 P.add_option(
'--output_pdb',
'-o', action=
'store', type=
'string',
63 help=
'output PDB file (required)')
64 P.add_option(
'--verbose',
'-v', action=
'store_true',
65 help=
'show more messages')
66 opts, args = P.parse_args()
68 not (opts.input_pdb
or opts.input_lib
or opts.output_pdb):
71 if not opts.input_pdb:
72 print(
'--input_pdb is required')
74 if not opts.output_pdb:
75 print(
'--output_pdb is required')
77 if not opts.input_lib:
78 print(
'--input_lib is required')
84 transform(opts.input_pdb, opts.input_lib, opts.output_pdb)
A class storing a whole rotamer library read from a file.
bool get_bool_flag(std::string name)
void write_pdb(const Selection &mhd, TextOutput out, unsigned int model=1)
void read_pdb(TextInput input, int model, Hierarchy h)
IMP-specific subclass of optparse.OptionParser.
Class for storing model, its restraints, constraints, and particles.
void transform(Hierarchy h, const algebra::Transformation3D &tr)
Transform a hierarchy. This is aware of rigid bodies.
A class performing the rotations of atoms in the residues.
Sampling of sidechain rotamers.
void set_log_level(LogLevel l)
Set the current global log level.
Basic functionality that is expected to be used by a wide variety of IMP users.
General purpose algebraic and geometric methods that are expected to be used by a wide variety of IMP...
Functionality for loading, creating, manipulating and scoring atomic structures.