def make_quasi_mode_input(self, mode=1, firstter=None, lastter=None): f_inp = path.join(self.inp_folder, 'quasi_mode.inp') crd_inp = path.join(self.heavy_folder, '{0}.nohydrogen.avg.crd'.format(self.type_na)) dcd_inp = path.join(self.mode_traj_folder, 'mode.{0}.dcd'.format(str(mode))) inp = Script(f_inp) inp.write_bomlev() inp.initialize_rtf_prm() inp.write_seq(self.seq1, firstter=firstter, lastter=lastter, segid='strand1') inp.write_seq(self.seq2, firstter=firstter, lastter=lastter, segid='strand2') inp.gen_angle_dihedral() inp.delete_selection() inp.read_crd(crd_inp) inp.read_traj(dcd_inp) inp.calculate_avg() inp.coor_copy() inp.write_quasi(vect=False) inp.quasi_end() inp.close_unit(21) inp.end()
def make_avg_crd_input(self, selection='all', amber=False, firstter=None, lastter=None): if self.type_na == 'arna+arna': supplement1 = None supplement2 = None elif self.type_na == 'bdna+bdna': supplement1 = get_patch(self.seq1, 1) supplement2 = get_patch(self.seq2, 2) f_inp = path.join(self.inp_folder, 'write_no_h_avg_crd.inp') crd_inp = path.join(self.heavy_folder, '{0}.nohydrogen.crd'.format(self.type_na)) dcd_inp = path.join(self.heavy_folder, '{0}.nohydrogen.dcd'.format(self.type_na)) crd_out = path.join(self.heavy_folder, '{0}.nohydrogen.avg.crd'.format(self.type_na)) inp = Script(f_inp) inp.write_bomlev() inp.initialize_rtf_prm(amber=amber) inp.write_seq(self.seq1, firstter=firstter, lastter=lastter, segid='strand1') if supplement1 is not None: inp.write_supplement(supplement1) inp.write_seq(self.seq2, firstter=firstter, lastter=lastter, segid='strand2') if supplement2 is not None: inp.write_supplement(supplement2) inp.gen_angle_dihedral() inp.delete_selection() inp.read_crd(crd_inp) inp.read_traj(dcd_inp) inp.calculate_avg(selection=selection) inp.coor_copy() inp.write_crd(crd_out, comp=True) inp.end()
def make_quasi_input(self, mass_all_same=False, amber=False, supplement1=None, supplement2=None, begin=1, stop=10000, firstter=None, lastter=None): f_inp = path.join(self.inp_folder, 'quasi.inp') crd_inp = path.join(self.heavy_folder, '{0}.nohydrogen.avg.crd'.format(self.type_na)) dcd_inp = path.join(self.heavy_folder, '{0}.nohydrogen.fitavg.dcd'.format(self.type_na)) crd_out = path.join(self.nm_folder, 'quasi.nmvector.crd') inp = Script(f_inp) inp.write_bomlev() inp.initialize_rtf_prm(amber=amber) inp.write_seq(self.seq1, firstter=firstter, lastter=lastter, segid='strand1') if supplement1 is not None: inp.write_supplement(supplement1) inp.write_seq(self.seq2, firstter=firstter, lastter=lastter, segid='strand2') if supplement2 is not None: inp.write_supplement(supplement2) inp.gen_angle_dihedral() inp.delete_selection() if mass_all_same: inp.set_all_mass_same() inp.read_crd(crd_inp) inp.read_traj(dcd_inp) inp.calculate_avg(begin=begin, stop=stop) inp.coor_copy() inp.write_quasi() inp.write_quasi_mode_crd(crd_out) inp.quasi_end() inp.close_unit(21) inp.end()