-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.py
39 lines (29 loc) · 1.06 KB
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from pathlib import Path
import sys
from proteingnn.data import *
def main():
pyrosetta.init()
fa_factory = DatasetFactory(name='FullAtomDatasetFactory')
fa_factory.node_filter = BaseNodeFilter()
fa_factory.node_featurizer = AtomtypeNodeFeaturizer()
# fa_factory.edge_featurizer = BondedEdgeFeaturizer()
# fa_factory.edge_featurizer = HbondEdgeFeaturizer(is_edge_only=False)
featurizers = [
BondedEdgeFeaturizer(is_edge_only=False),
DistanceEdgeFeaturizer(max_distance=3, is_edge_only=False),
HbondEdgeFeaturizer(is_edge_only=False),
]
edge_featurizer = CompositeEdgeFeaturizer(
name='CompositeEdgeFeaturizer',
featurizers=featurizers,
all_is_edge=False,
)
fa_factory.edge_featurizer = edge_featurizer
# test on single datum
pdbs = get_directory_pdb(fa_factory.predataset_path, deep=True)
pdb = next(pdbs)
data = fa_factory.process_complex(pdb)
# test on full data
# fa_factory.create_dataset(pos_flag=True, n_processes=1)
if __name__ == '__main__':
main()