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.data_transform.atom37_to_frames

View Source On Gitee
mindsponge.data_transform.atom37_to_frames(aatype, all_atom_positions, all_atom_mask, is_affine=False)[source]

Computes the torsion angle of up to 8 rigid groups for each residue, shape is [Nres,8,12], where 8 is indicates that each residue can be divided into up to 8 rigid groups according to the dependence of the atom on the torsion angle, there are 1 backbone frame and 7 side-chain frames. For the meaning of 12 ,the first 9 elements are the 9 components of rotation matrix, the last 3 elements are the 3 component of translation matrix.

Parameters
  • aatype (numpy.array) – Amino acid sequence, [Nres] .

  • all_atom_positions (numpy.array) – The coordinates of all atoms, presented as atom37, [Nres,37,3].

  • all_atom_mask (numpy.array) – Mask of all atomic coordinates, [Nres,37].

  • is_affine (bool) – Whether to perform affine, the default value is False.

Returns

Dictionary, the specific content is as follows.

  • rigidgroups_gt_frames (numpy.array) - The torsion angle of the 8 rigid body groups for each residue, [Nres,8,12].

  • rigidgroups_gt_exists (numpy.array) - The mask of rigidgroups_gt_frames denoting whether the rigid body group exists according to the experiment, [Nres,8].

  • rigidgroups_group_exists (numpy.array) - Mask denoting whether given group is in principle present for given amino acid type, [Nres,8] .

  • rigidgroups_group_is_ambiguous (numpy.array) - Indicates that the position is chiral symmetry, [Nres,8] .

  • rigidgroups_alt_gt_frames (numpy.array) - 8 Frames with alternative atom renaming corresponding to 'all_atom_positions' represented as flat 12 dimensional array [Nres,8,12] .

  • backbone_affine_tensor (numpy.array) - The translation and rotation of the local coordinates of each amino acid relative to the global coordinates, [Nres,7] , for the last dimension, the first 4 elements are the affine tensor which contains the rotation information, the last 3 elements are the translations in space.

Supported Platforms:

Ascend GPU CPU

Examples

>>> import numpy as np
>>> from mindsponge.data import atom37_to_frames
>>> from mindspore import dtype as mstype
>>> from mindspore import Tensor
>>> aatype = np.ones(193,dtype=np.int32)
>>> all_atom_positions = np.ones((193,37,3),dtype=np.float32)
>>> all_atom_mask = np.ones((193,37),dtype=np.int32)
>>> result = atom37_to_frames(aatype,all_atom_positions,all_atom_mask)
>>> for key in result.keys():
>>>     print(key,result[key].shape)
rigidgroups_gt_frames (193, 8, 12)
rigidgroups_gt_exists (193, 8)
rigidgroups_group_exists (193, 8)
rigidgroups_group_is_ambiguous (193, 8)
rigidgroups_alt_gt_frames (193, 8, 12)