MCPcopy Index your code
hub / github.com/DeepGraphLearning/DiffPack / _get_symm_atoms

Function _get_symm_atoms

diffpack/rotamer.py:975–984  ·  view source on GitHub ↗
(pos_per_residue, residue_type)

Source from the content-addressed store, hash-verified

973
974
975def _get_symm_atoms(pos_per_residue, residue_type):
976 sym_pos_per_residue = pos_per_residue.clone() # [num_residues, 37, 3]
977 for i in range(2):
978 atom_to = res_sym_atom_posn.to(residue_type.device)[residue_type][:, i, 0] # [num_residues]
979 atom_from = res_sym_atom_posn.to(residue_type.device)[residue_type][:, i, 1] # [num_residues]
980 sym_pos_per_residue[torch.arange(len(pos_per_residue)), atom_to] = \
981 pos_per_residue[torch.arange(len(pos_per_residue)), atom_from]
982 sym_pos_per_residue[torch.arange(len(pos_per_residue)), atom_from] = \
983 pos_per_residue[torch.arange(len(pos_per_residue)), atom_to]
984 return sym_pos_per_residue

Callers 1

get_metricMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected