def pose_from_params(filename, params_list): pose = Pose() rts = pose.conformation().modifiable_residue_type_set_for_conf( core.chemical.FULL_ATOM_t) rts.read_files_for_base_residue_types(Vector1(params_list)) pose.conformation().reset_residue_type_set_for_conf(rts) pose_from_file(pose, pose.residue_type_set_for_pose(), filename) return pose
def pose_from_pubchem(cid, name, temporary=True): pose = Pose() if temporary: # the temporary solution, create an ephemeral ResidueSet params_from_pubchem(cid, name) # Add the new ResidueType to the pose rts = pose.conformation().modifiable_residue_type_set_for_conf( core.chemical.FULL_ATOM_t) rts.add_base_residue_type(name) pose.conformation().reset_residue_type_set_for_conf(rts) # fill the pose pose_from_file(pose, pose.residue_type_set_for_pose(), name + "_0001.pdb") else: # permanent solution, add to .params list add_cid_to_database(cid, name) # fill the pose pose_from_file(pose, name + "_0001.pdb") return pose