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.find_optimal_renaming

View Source On Gitee
mindsponge.common.find_optimal_renaming(atom14_gt_positions, atom14_alt_gt_positions, atom14_atom_is_ambiguous, atom14_gt_exists, atom14_pred_positions)[source]

Find optimal renaming for ground truth that maximizes LDDT.

Reference:

Jumper et al. (2021) Suppl. Alg. 26 "renameSymmetricGroundTruthAtoms"

Parameters
  • atom14_gt_positions (Tensor) – Ground truth positions in global frame with shape (Nres,14,3).

  • atom14_alt_gt_positions (Tensor) – Alternate ground truth positions in global frame with coordinates of ambiguous atoms swapped relative to 'atom14_gt_positions'. The shape is (Nres,14,3).

  • atom14_atom_is_ambiguous (Tensor) – Mask denoting whether atom is among ambiguous atoms, see Jumper et al. (2021) Suppl. Table 3. The shape is (Nres,14).

  • atom14_gt_exists (Tensor) – Mask denoting whether atom at positions exists in ground truth with shape (Nres,14).

  • atom14_pred_positions (Tensor) – Predicted positions of atoms in global prediction frame with shape (Nres,14,3).

Returns

Tensor, (Nres,) with 1.0 where atom14_alt_gt_positions is closer to prediction and otherwise 0.

Supported Platforms:

Ascend GPU

Examples

>>> import numpy as np
>>> from mindsponge.common.utils import find_optimal_renaming
>>> from mindspore import Tensor
>>> n_res = 16
>>> atom14_gt_positions = Tensor(np.random.randn(n_res, 14, 3).astype(np.float32))
>>> atom14_alt_gt_positions = Tensor(np.random.randn(n_res, 14, 3).astype(np.float32))
>>> atom14_atom_is_ambiguous = Tensor(np.random.randn(n_res, 14).astype(np.float32))
>>> atom14_gt_exists = Tensor(np.random.randn(n_res, 14).astype(np.float32))
>>> atom14_pred_positions = Tensor(np.random.randn(n_res, 14, 3).astype(np.float32))
>>> out = find_optimal_renaming(atom14_gt_positions, atom14_alt_gt_positions,
...                             atom14_atom_is_ambiguous, atom14_gt_exists, atom14_pred_positions)
>>> print(out.shape)
(16,)