openfold.np.protein¶
Protein data type.
Classes
|
Protein structure representation. |
Functions
|
Add pdb headers to an existing PDB string. |
|
Takes a PDB string and constructs a Protein object. |
|
Assembles a protein from a prediction. |
|
|
|
|
|
Computes an ideal atom mask. |
|
Converts a Protein instance to a ModelCIF string. |
|
Converts a Protein instance to a PDB string. |
- class Protein(atom_positions, aatype, atom_mask, residue_index, b_factors, chain_index=None, remark=None, parents=None, parents_chain_index=None)¶
Protein structure representation.
- Parameters:
- add_pdb_headers(prot, pdb_str)¶
Add pdb headers to an existing PDB string. Useful during multi-chain recycling
- from_pdb_string(pdb_str, chain_id=None)¶
Takes a PDB string and constructs a Protein object.
- WARNING: All non-standard residue types will be converted into UNK. All
non-standard atoms will be ignored.
- from_prediction(features, result, b_factors=None, remove_leading_feature_dimension=True, remark=None, parents=None, parents_chain_index=None)¶
Assembles a protein from a prediction.
- Parameters:
features (Mapping[str, ndarray]) – Dictionary holding model inputs.
result (Mapping[str, Any]) – Dictionary holding model outputs.
b_factors (ndarray | None) – (Optional) B-factors to use for the protein.
remove_leading_feature_dimension (bool) – Whether to remove the leading dimension of the features values
chain_index – (Optional) Chain indices for multi-chain predictions
remark (str | None) – (Optional) Remark about the prediction
parents (Sequence[str] | None) – (Optional) List of template names
- Returns:
A protein instance.
- Return type:
- get_pdb_headers(prot, chain_id=0)¶
- ideal_atom_mask(prot)¶
Computes an ideal atom mask.
Protein.atom_mask typically is defined according to the atoms that are reported in the PDB. This function computes a mask according to heavy atoms that should be present in the given sequence of amino acids.
- to_modelcif(prot)¶
Converts a Protein instance to a ModelCIF string. Chains with identical modelled coordinates will be treated as the same polymer entity. But note that if chains differ in modelled regions, no attempt is made at identifying them as a single polymer entity.