src/proteingnn/data.py
def featurize(self, pose: PoseType, atom_id1: AtomIDType, atom_id2: AtomIDType) -> Tuple[bool, List[Number]]:
        """Annotate in accordance to sub-EdgeFeaturizers and append outputs."""
        is_edges = []
        features = []
        for featurizer in self.components:
            is_edge, feature = featurizer.featurize(pose, atom_id1, atom_id2)
            is_edges.append(is_edge)
            features += feature

        is_edge = all(is_edges) if self.intersection else any(is_edges)
        if self.n_features:
            assert len(features) == self.n_features, \
                f'Irregular feature length. (storage: {self.n_features} v.s. current {len(features)})'
        else:
            self.n_features = len(features)

        return is_edge, features
Annotate in accordance to sub-EdgeFeaturizers and append outputs.
Annotate in accordance to sub-EdgeFeaturizers and append outputs.
Annotate in accordance to sub - EdgeFeaturizers and append outputs .
def featurize(self, pose: PoseType, atom_id1: AtomIDType, atom_id2: AtomIDType) -> Tuple[bool, List[Number]]:
        is_edges = []
        features = []
        for featurizer in self.components:
            is_edge, feature = featurizer.featurize(pose, atom_id1, atom_id2)
            is_edges.append(is_edge)
            features += feature
        is_edge = all(is_edges) if self.intersection else any(is_edges)
        if self.n_features:
            assert len(features) == self.n_features, \
                f'Irregular feature length. (storage: {self.n_features} v.s. current {len(features)})'
        else:
            self.n_features = len(features)
        return is_edge, features
def featurize ( self , pose : PoseType , atom_id1 : AtomIDType , atom_id2 : AtomIDType ) -> Tuple [ bool , List [ Number ] ] : is_edges = [ ] features = [ ] for featurizer in self . components : is_edge , feature = featurizer . featurize ( pose , atom_id1 , atom_id2 ) is_edges . append ( is_edge ) features += feature is_edge = all ( is_edges ) if self . intersection else any ( is_edges ) if self . n_features : assert len ( features ) == self . n_features , f'Irregular feature length. (storage: {self.n_features} v.s. current {len(features)})' else : self . n_features = len ( features ) return is_edge , features
Annotate in accordance to sub-EdgeFeaturizers and append outputs.
Annotate in accordance to sub - EdgeFeaturizers and append outputs .
"""Annotate in accordance to sub-EdgeFeaturizers and append outputs."""
self
pose
PoseType
atom_id1
AtomIDType
atom_id2
AtomIDType