mindsponge.common.get_pdb_info

View Source On Gitee
mindsponge.common.get_pdb_info(pdb_path)[source]

get atom positions, residue index etc. info from pdb file.

Parameters

pdb_path (str) – the path of the input pdb.

Returns

features(dict), the information of pdb, including these keys

  • aatype, numpy.array. Protein sequence encoding. Encoding method refers to common.residue_constants_restype_order, \([0,20]\) . 20 means the amino acid is UNK. Shape \((N_{res}, )\) .

  • all_atom_positions, numpy.array. Coordinates of all residues in pdb. Shape \((N_{res}, 37)\) .

  • all_atom_mask, numpy.array. Mask of atoms in pdb. Shape \((N_{res}, 37)\) . 0 means the atom inexistence.

  • atom14_atom_exists, numpy.array. Densely encoding, mask of all atoms in protein. The position with atoms is 1 and the position without atoms is 0. Shape is \((N_{res}, 14)\).

  • atom14_gt_exists, numpy.array. Densely encoding, mask of all atoms in protein. Keep the same as atom14_atom_exist. Shape is \((N_{res}, 14)\).

  • atom14_gt_positions, numpy.array. Densely encoding, coordinates of all atoms in the protein. Shape is \((N_{res}, 14, 3)\).

  • residx_atom14_to_atom37, numpy.array. Index of mapping sparse encoding atoms with densely encoding method. Shape is \((N_{res}, 14)\) .

  • residx_atom37_to_atom14, numpy.array. Index of mapping densely encoding atoms with sparse encoding method. Shape is \((N_{res}, 37)\) .

  • atom37_atom_exists, numpy.array. Sparse encoding, mask of all atoms in protein. The position with atoms is 1 and the position without atoms is 0. Shape is \((N_{res}, 37)\).

  • atom14_alt_gt_positions, numpy.array. Densely encoding, coordinates of all atoms in chiral proteins. Shape is \((N_{res}, 14, 3)\) .

  • atom14_alt_gt_exists, numpy.array. Densely encoding, mask of all atoms in chiral proteins. Shape is \((N_{res}, 14)\) .

  • atom14_atom_is_ambiguous, numpy.array. Because of the local symmetry of some amino acid structures, the symmetric atomic codes can be transposed. Specific atoms can be found in common.residue_atom_renaming_swaps. This feature records the uncertain atom encoding positions. Shape is \((N_{res}, 14)\) .

  • residue_index, numpy.array. Residue index information of protein sequence, ranging from 1 to \(N_{res}\) . Shape is \((N_{res}, )\) .

Supported Platforms:

Ascend GPU

Examples

>>> from mindsponge.common import get_pdb_info
>>> pdb_path = "YOUR PDB PATH"
>>> pdb_feature = get_pdb_info(pdb_path)
>>> for feature in pdb_feature:
>>>     print(feature, pdb_feature[feature])
# Nres represents the Amino acid num of the input pdb.
aatype (Nres,)
all_atom_positions (Nres, 37, 3)
all_atom_mask (Nres, 37)
atom14_atom_exists (Nres, 14)
atom14_gt_exists (Nres, 14)
atom14_gt_positions (Nres, 14, 3)
residx_atom14_to_atom37 (Nres, 14)
residx_atom37_to_atom14 (Nres, 37)
atom37_atom_exists (Nres, 37)
atom14_alt_gt_positions (Nres, 14, 3)
atom14_alt_gt_exists (Nres, 14)
atom14_atom_is_ambiguous (Nres, 14)
residue_index (Nres, )