def make_input_line(self): """PDB line for this atom. TODO - Could be @property method/attribute TODO - figure out difference between make_pdb_line, make_input_line, and make_pdb_line2 Returns: String with PDB-format line. """ group = '-' model_pka = '-' if self.group: group = self.group.type if self.terminal == 'C-': group = 'C-' ## circumventing C-/COO parameter unification if self.group.titratable: model_pka = PKA_FMT.format(self.group.model_pka) str_ = INPUT_LINE_FMT.format(type=self.type.upper(), r=self, atom_label=make_tidy_atom_label( self.name, self.element), group=group, pka=model_pka) return str_
def get_tidy_label(self): """Returns a 'tidier' atom label for printing the new pdbfile TODO - this could/should be a @property method/attribute Returns: String with label""" return make_tidy_atom_label(self.name, self.element)
def make_pdb_line2(self, numb=None, name=None, res_name=None, chain_id=None, res_num=None, x=None, y=None, z=None, occ=None, beta=None): """Create a PDB line. TODO - this could/should be a @property method/attribute TODO - figure out difference between make_pdb_line, make_input_line, and make_pdb_line2 Returns: String with PDB line. """ if numb is None: numb = self.numb if name is None: name = self.name if res_name is None: res_name = self.res_name if chain_id is None: chain_id = self.chain_id if res_num is None: res_num = self.res_num if x is None: x = self.x if y is None: y = self.y if z is None: z = self.z if occ is None: occ = self.occ if beta is None: beta = self.beta str_ = PDB_LINE_FMT2.format(numb=numb, res_name=res_name, chain_id=chain_id, res_num=res_num, x=x, y=y, z=z, occ=occ, beta=beta, atom_label=make_tidy_atom_label( name, self.element)) return str_
def make_mol2_line(self, id_): """Create MOL2 line. Format: 1 S1 3.6147 2.0531 1.4795 S.3 1 noname -0.1785 TODO - this could/should be a @property method/attribute Returns: String with MOL2 line. """ str_ = MOL2_LINE_FMT.format( id=id_, r=self, atom_label=make_tidy_atom_label(self.name, self.element)) return str_
def make_pdb_line(self): """Create PDB line. TODO - this could/should be a @property method/attribute TODO - figure out difference between make_pdb_line, make_input_line, and make_pdb_line2 Returns: String with PDB line. """ str_ = PDB_LINE_FMT1.format( type=self.type.upper(), r=self, atom_label=make_tidy_atom_label(self.name, self.element)) return str_