def optimize(self): span = self.__update_schedule() self.__check_schedule() ometh = self.__get_optimization_method() AutoCommands.optimize(self, residue_span_range=span, optimization_method=ometh)
def pick_restraints(self): if not self.vars['add_restraints']: mdl = self.get_mdl() rsr = _modeller.mod_model_rsr_get(mdl) _modeller.mod_restraints_unpick_all(rsr) span = self.__update_schedule() AutoCommands.pick_restraints(self, residue_span_range=span)
def read_parameters(self): if not self.vars['add_parameters']: # Clear both CHARMM parameters and group restraint parameters _modeller.mod_parameters_clear(self.get_prm()) _modeller.mod_group_restraints_clear(self.get_gprsr()) self.__default_file('file', '.toplib', ('', '.lib')) AutoCommands.read_parameters(self)
def sequence_comparison(self): self.__default_file('rr_file', '.A', ('', '.mat')) self.__default_file('matrix_file', '.M') self.__default_file('variability_file', '.V') AutoCommands.sequence_comparison( self, matrix_file=self.__add_outdir('matrix_file'), variability_file=self.__add_outdir('variability_file'))
def read_alignment(self): if not self.vars['add_sequence']: _modeller.mod_alignment_clear(self.get_aln()) self.__default_file('file', '.A', ('', '.ali')) fh = modfile.File(self.vars['file'], 'r') AutoCommands.read_alignment(self, allow_alternates=False, fh=fh.file_pointer) fh.close()
def generate_topology(self): seq = self.vars['sequence'] iseq = _modeller.mod_alignment_find_code(self.get_aln(), seq) if iseq < 0: log.error('generate_topology', "Sequence '%s' not found in alignment" % seq) if not self.vars['add_segment']: _modeller.mod_model_topology_clear(self.get_mdl()) AutoCommands.generate_topology(self, iseq=iseq)
def read_model(self): self.__default_file('file', 'B') (file, model_segment) = self.__seg_from_aln('model_segment') io = self.get_io() file = _modeller.mod_pdb_filename_get(file, io.atom_files_directory) fh = modfile.File(file, 'r') AutoCommands.read_model(self, fh=fh.file_pointer, model_segment=model_segment, keep_disulfides=False) fh.close() self.__pickall()
def delete_restraint(self): atom_names = self.vars['atom_ids'] mdl = self.get_mdl(1) cd = _modeller.mod_model_cd_get(mdl) seq = _modeller.mod_model_seq_get(mdl) atom_ids = [_modeller.mod_coordinates_find_atom(cd, seq, a) \ for a in atom_names] if 0 in atom_ids: log.warning("delete_restraint", "One or more atoms absent from MODEL: " \ + " ".join(atom_names)) else: AutoCommands.unpick_restraints(self, atom_ids=atom_ids)
def make_restraints(self): if not self.vars['add_restraints']: _modeller.mod_restraints_clear(self.get_mdl()) span = self.__update_schedule() rsrtype = self.vars['restraint_type'].lower() if rsrtype == 'alpha': self.__make_sstruc_restraints(_modeller.mod_restraints_make_alpha) elif rsrtype == 'strand': self.__make_sstruc_restraints(_modeller.mod_restraints_make_strand) elif rsrtype == 'sheet': self.__make_sheet_restraints() else: AutoCommands.make_restraints(self, residue_span_range=span, exclude_distance=0.0)
def sequence_to_ali(self): aln = self.get_aln() if not self.vars['add_sequence']: _modeller.mod_alignment_clear(aln) nseq = _modeller.mod_alignment_nseq_get(aln) try: align_codes = self.vars['align_codes'][nseq] except IndexError: align_codes = '' try: atom_files = self.vars['atom_files'][nseq] except IndexError: atom_files = '' AutoCommands.sequence_to_ali(self, align_codes=align_codes, atom_files=atom_files)
def read_sequence_db(self): chains = self.vars['chains_list'] if chains.upper() != 'ALL': self.__default_file('chains_list', 'H', ('', '.list')) self.__default_file('seq_database_file', 'H', ('', '.seq')) AutoCommands.read_sequence_db(self)
def read_restyp_lib(self): fh = modfile.File(self.vars['restyp_lib_file'], 'r') AutoCommands.read_restyp_lib(self, fh=fh.file_pointer)
def prof_to_aln(self): if not self.vars['append_aln']: _modeller.mod_alignment_clear(self.get_aln()) AutoCommands.prof_to_aln(self)
def read_alignment2(self): if not self.vars['add_sequence']: _modeller.mod_alignment_clear(self.get_aln(2)) self.__default_file('file', '.A', ('', '.ali')) AutoCommands.read_alignment2(self)
def principal_components(self): self.__default_file('matrix_file', '.G') self.__default_file('file', '.dat') AutoCommands.principal_components(self)
def edit_alignment(self): AutoCommands.edit_alignment(self, by_chain=False)
def read_density(self): fh = modfile.File(self.vars['file'], 'rb') AutoCommands.read_density(self, fh=fh.file_pointer, read_origin=False) fh.close()
def salign(self): AutoCommands.salign(self, rms_cutoff=self.vars['rms_cutoffs'][0], break_break_bonus=0.)
def patch(self): mdl = self.get_mdl() resids = self.__parse_residue_ids(mdl, self.vars['residue_ids']) AutoCommands.patch(self, residue_ids=resids)
def build_profile(self): self.__default_file('rr_file', '.mat', ('', '.mat')) AutoCommands.build_profile(self, window_size=1024)
def write_pdb_xref(self): self.__default_file('file', '.X') (file, model_segment) = self.__seg_from_aln('model_segment') AutoCommands.write_pdb_xref(self, model_segment=model_segment, file=self.__add_outdir('file'))
def align2d(self): self.__default_file('rr_file', '.A', ('', '.mat')) AutoCommands.align2d(self, break_break_bonus=0.)
def superpose(self): AutoCommands.superpose(self, rms_cutoff=self.vars['rms_cutoffs'][0])
def write_sequence_db(self): self.__default_file('chains_list', 'H') self.__default_file('seq_database_file', 'H') AutoCommands.write_sequence_db(self, window_size=1024)
def compare(self): AutoCommands.compare(self, varatom=self.vars['distance_atoms'][0])
def seqfilter(self): self.__default_file('rr_file', '.mat', ('', '.mat')) AutoCommands.seqfilter(self, window_size=512)
def make_chains(self): AutoCommands.make_chains(self, chop_nonstd_termini= \ self.vars['chop_nonstd_terminii'])
def open(self): self.__default_file('objects_file', 'TOP') AutoCommands.open(self)
def read_atom_classes(self): fh = modfile.File(self.vars['atom_classes_file'], 'r') AutoCommands.read_atom_classes(self, fh=fh.file_pointer) fh.close()
def inquire(self): self.__default_file('file', '.B') AutoCommands.inquire(self)