src/proteingnn/data.py
def featurize(self, pose: PoseType, atom_id: AtomIDType) -> List[Number]:
        """Annotate node by atom category in one-hot encoding"""
        residue = pose.residue(atom_id.rsd())
        atom_name = residue.atom_name(atom_id.atomno())
        atom_name = atom_name.strip()
        atom_cat = self._atomname2cat[atom_name]

        # index must start at 1
        encoding = [1 if atom_cat == i else 0
                    for i in range(1, len(self.atom_cats) + 1)]
        return encoding
Annotate node by atom category in one-hot encoding
Annotate node by atom category in one-hot encoding
Annotate node by atom category in one - hot encoding
def featurize(self, pose: PoseType, atom_id: AtomIDType) -> List[Number]:
        residue = pose.residue(atom_id.rsd())
        atom_name = residue.atom_name(atom_id.atomno())
        atom_name = atom_name.strip()
        atom_cat = self._atomname2cat[atom_name]
        encoding = [1 if atom_cat == i else 0
                    for i in range(1, len(self.atom_cats) + 1)]
        return encoding
def featurize ( self , pose : PoseType , atom_id : AtomIDType ) -> List [ Number ] : residue = pose . residue ( atom_id . rsd ( ) ) atom_name = residue . atom_name ( atom_id . atomno ( ) ) atom_name = atom_name . strip ( ) atom_cat = self . _atomname2cat [ atom_name ] encoding = [ 1 if atom_cat == i else 0 for i in range ( 1 , len ( self . atom_cats ) + 1 ) ] return encoding
Annotate node by atom category in one-hot encoding
Annotate node by atom category in one - hot encoding
"""Annotate node by atom category in one-hot encoding""" # index must start at 1
self
pose
PoseType
atom_id
AtomIDType