Example #1
0
 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)
Example #2
0
 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)
Example #3
0
 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)
Example #4
0
 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'))
Example #5
0
 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()
Example #6
0
 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)
Example #7
0
 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()
Example #8
0
 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)
Example #9
0
 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)
Example #10
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)
Example #11
0
 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)
Example #12
0
 def read_restyp_lib(self):
     fh = modfile.File(self.vars['restyp_lib_file'], 'r')
     AutoCommands.read_restyp_lib(self, fh=fh.file_pointer)
Example #13
0
 def prof_to_aln(self):
     if not self.vars['append_aln']:
         _modeller.mod_alignment_clear(self.get_aln())
     AutoCommands.prof_to_aln(self)
Example #14
0
 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)
Example #15
0
 def principal_components(self):
     self.__default_file('matrix_file', '.G')
     self.__default_file('file', '.dat')
     AutoCommands.principal_components(self)
Example #16
0
 def edit_alignment(self):
     AutoCommands.edit_alignment(self, by_chain=False)
Example #17
0
 def read_density(self):
     fh = modfile.File(self.vars['file'], 'rb')
     AutoCommands.read_density(self, fh=fh.file_pointer, read_origin=False)
     fh.close()
Example #18
0
 def salign(self):
     AutoCommands.salign(self,
                         rms_cutoff=self.vars['rms_cutoffs'][0],
                         break_break_bonus=0.)
Example #19
0
 def patch(self):
     mdl = self.get_mdl()
     resids = self.__parse_residue_ids(mdl, self.vars['residue_ids'])
     AutoCommands.patch(self, residue_ids=resids)
Example #20
0
 def build_profile(self):
     self.__default_file('rr_file', '.mat', ('', '.mat'))
     AutoCommands.build_profile(self, window_size=1024)
Example #21
0
 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'))
Example #22
0
 def align2d(self):
     self.__default_file('rr_file', '.A', ('', '.mat'))
     AutoCommands.align2d(self, break_break_bonus=0.)
Example #23
0
 def superpose(self):
     AutoCommands.superpose(self, rms_cutoff=self.vars['rms_cutoffs'][0])
Example #24
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)
Example #25
0
 def compare(self):
     AutoCommands.compare(self, varatom=self.vars['distance_atoms'][0])
Example #26
0
 def seqfilter(self):
     self.__default_file('rr_file', '.mat', ('', '.mat'))
     AutoCommands.seqfilter(self, window_size=512)
Example #27
0
 def make_chains(self):
     AutoCommands.make_chains(self, chop_nonstd_termini= \
                                    self.vars['chop_nonstd_terminii'])
Example #28
0
 def open(self):
     self.__default_file('objects_file', 'TOP')
     AutoCommands.open(self)
Example #29
0
 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()
Example #30
0
 def inquire(self):
     self.__default_file('file', '.B')
     AutoCommands.inquire(self)