Modification of the name and composition of nucleotide triphosphates (GTP etc.)
Showing
1 changed file
with
20 additions
and
3 deletions
... | @@ -148,7 +148,9 @@ class SelectivePortionSelector(object): | ... | @@ -148,7 +148,9 @@ class SelectivePortionSelector(object): |
148 | # Refuse hydrogens | 148 | # Refuse hydrogens |
149 | if self.hydrogen_regex.match(atom.get_id()): | 149 | if self.hydrogen_regex.match(atom.get_id()): |
150 | return 0 | 150 | return 0 |
151 | - | 151 | + # Refuse the first two phosohate groups when residue is a triphosphate |
152 | + if atom.get_id() in ['O3B', 'O2B', 'O1B', 'PB', 'O3G', 'O2G', 'O1G', 'PG' ]: | ||
153 | + return 0 | ||
152 | # Accept all atoms otherwise. | 154 | # Accept all atoms otherwise. |
153 | return 1 | 155 | return 1 |
154 | 156 | ||
... | @@ -295,10 +297,25 @@ class Chain: | ... | @@ -295,10 +297,25 @@ class Chain: |
295 | res_id[2]=' ' | 297 | res_id[2]=' ' |
296 | res_id[0]=' ' | 298 | res_id[0]=' ' |
297 | res_id=tuple(res_id) | 299 | res_id=tuple(res_id) |
300 | + if nt in ['ATP', 'GTP', 'CTP', 'UTP']: | ||
301 | + res_name = res.get_resname()[0] | ||
302 | + else : | ||
303 | + res_name=res.get_resname() | ||
298 | res_atoms=res.get_atoms() | 304 | res_atoms=res.get_atoms() |
299 | - new_residu_t=pdb.Residue.Residue(res_id, res.get_resname(), res.get_segid()) | 305 | + new_residu_t=pdb.Residue.Residue(res_id, res_name, res.get_segid()) |
300 | for atom in list(res.get_atoms()): | 306 | for atom in list(res.get_atoms()): |
301 | - new_atom_t=atom.copy() | 307 | + if atom.get_name() in ['PA', 'O1A', 'O2A', 'O3A']: |
308 | + if atom.get_name() == 'PA': | ||
309 | + atom_name = 'P' | ||
310 | + if atom.get_name() == 'O1A': | ||
311 | + atom_name = 'OP1' | ||
312 | + if atom.get_name() == 'O2A': | ||
313 | + atom_name = 'OP2' | ||
314 | + if atom.get_name() == 'O3A': | ||
315 | + atom_name = 'OP3' | ||
316 | + new_atom_t = pdb.Atom.Atom(atom_name, atom.get_coord(), atom.get_bfactor(), atom.get_occupancy(), atom.get_altloc(), atom_name, atom.get_serial_number()) | ||
317 | + else : | ||
318 | + new_atom_t=atom.copy() | ||
302 | new_residu_t.add(new_atom_t) | 319 | new_residu_t.add(new_atom_t) |
303 | new_chain_t.add(new_residu_t) | 320 | new_chain_t.add(new_residu_t) |
304 | 321 | ... | ... |
-
mentioned in commit e2b121ca
-
Please register or login to post a comment