miniworld.feature.MiniWorld_featuring_species.template_featurize

miniworld.feature.MiniWorld_featuring_species.template_featurize(input_template_dict, params)[source]

I modified RF2 version.

In MSA_featurize, I changed the name of variables and a small part of code because the shape of inputs (msa, insertion) are almost same as RF2. On the other hand, I totally reconstructed template structure, so I changed a lot in this function.

Note

Processes template information for a single chain.

Parameters:
  • input_template_dict (dict) –

    A dictionary containing template information. It should have the following keys:

    • ’xyz’: torch.Tensor of shape (N_template, L_chain, 27, 3)

    • ’mask’: torch.Tensor of shape (N_template, L_chain, 27)

    • ’sequence’: torch.Tensor of shape (N_template, L_chain, NUM_CLASSES)

    • ’f0d’: torch.Tensor of shape (N_template)

    • ’f1d’: torch.Tensor of shape (N_template, L_chain)

  • params (dict) – Dictionary of parameters.

Returns:

A dictionary with processed template features:

  • ’xyz’: torch.Tensor of shape (npick_global, L_query, 27, 3)

  • ’template_1D’: torch.Tensor of shape (npick_global, L_query, 23 + 1)

  • ’template_atom_mask’: torch.Tensor of shape (npick_global, L_query, 27)

Return type:

dict