Document feedback

Question document fragment

When a question document fragment contains a formula, it is displayed as a space.

Submission type
issue

It's a little complicated...

I'd like to ask someone.

PR

Just a small problem.

I can fix it online!

Please select the submission type

Problem type
Specifications and Common Mistakes

- Specifications and Common Mistakes:

- Misspellings or punctuation mistakes,incorrect formulas, abnormal display.

- Incorrect links, empty cells, or wrong formats.

- Chinese characters in English context.

- Minor inconsistencies between the UI and descriptions.

- Low writing fluency that does not affect understanding.

- Incorrect version numbers, including software package names and version numbers on the UI.

Usability

- Usability:

- Incorrect or missing key steps.

- Missing main function descriptions, keyword explanation, necessary prerequisites, or precautions.

- Ambiguous descriptions, unclear reference, or contradictory context.

- Unclear logic, such as missing classifications, items, and steps.

Correctness

- Correctness:

- Technical principles, function descriptions, supported platforms, parameter types, or exceptions inconsistent with that of software implementation.

- Incorrect schematic or architecture diagrams.

- Incorrect commands or command parameters.

- Incorrect code.

- Commands inconsistent with the functions.

- Wrong screenshots.

- Sample code running error, or running results inconsistent with the expectation.

Risk Warnings

- Risk Warnings:

- Lack of risk warnings for operations that may damage the system or important data.

Content Compliance

- Content Compliance:

- Contents that may violate applicable laws and regulations or geo-cultural context-sensitive words and expressions.

- Copyright infringement.

Please select the type of question

Problem description

Describe the bug so that we can quickly locate the problem.

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 (Nres,) .

  • all_atom_positions, numpy.array. Coordinates of all residues in pdb. Shape (Nres,37) .

  • all_atom_mask, numpy.array. Mask of atoms in pdb. Shape (Nres,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 (Nres,14).

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

  • atom14_gt_positions, numpy.array. Densely encoding, coordinates of all atoms in the protein. Shape is (Nres,14,3).

  • residx_atom14_to_atom37, numpy.array. Index of mapping sparse encoding atoms with densely encoding method. Shape is (Nres,14) .

  • residx_atom37_to_atom14, numpy.array. Index of mapping densely encoding atoms with sparse encoding method. Shape is (Nres,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 (Nres,37).

  • atom14_alt_gt_positions, numpy.array. Densely encoding, coordinates of all atoms in chiral proteins. Shape is (Nres,14,3) .

  • atom14_alt_gt_exists, numpy.array. Densely encoding, mask of all atoms in chiral proteins. Shape is (Nres,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 (Nres,14) .

  • residue_index, numpy.array. Residue index information of protein sequence, ranging from 1 to Nres . Shape is (Nres,) .

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, )