Returns a PDB `TER` record for the end of a chain. Adapted from: https://github.com/jasonkyuyim/se3_diffusion :param atom_index: The index of the last atom in the chain. :param end_resname: The residue name of the last residue in the chain. :param chain_name: The chain name of the
(
atom_index: Union[int, np.int64],
end_resname: str,
chain_name: str,
residue_index: Union[int, np.int64],
)
| 26 | |
| 27 | @beartype |
| 28 | def _chain_end( |
| 29 | atom_index: Union[int, np.int64], |
| 30 | end_resname: str, |
| 31 | chain_name: str, |
| 32 | residue_index: Union[int, np.int64], |
| 33 | ) -> str: |
| 34 | """Returns a PDB `TER` record for the end of a chain. |
| 35 | |
| 36 | Adapted from: https://github.com/jasonkyuyim/se3_diffusion |
| 37 | |
| 38 | :param atom_index: The index of the last atom in the chain. |
| 39 | :param end_resname: The residue name of the last residue in the chain. |
| 40 | :param chain_name: The chain name of the last residue in the chain. |
| 41 | :param residue_index: The residue index of the last residue in the chain. |
| 42 | :return: A PDB `TER` record. |
| 43 | """ |
| 44 | chain_end = "TER" |
| 45 | return ( |
| 46 | f"{chain_end:<6}{atom_index:>5} {end_resname:>3} " |
| 47 | f"{chain_name:>1}{residue_index:>4}" |
| 48 | ) |
| 49 | |
| 50 | |
| 51 | @beartype |