MCPcopy Index your code
hub / github.com/DeepGraphLearning/S3F / graph_concat

Function graph_concat

script/evaluate.py:47–65  ·  view source on GitHub ↗
(graphs)

Source from the content-addressed store, hash-verified

45
46
47def graph_concat(graphs):
48 if len(graphs) == 1:
49 return graphs[0]
50 graph = graphs[0].pack(graphs)
51 if isinstance(graph, data.Protein):
52 # residue graph
53 _graph = data.Protein(edge_list=graph.edge_list, atom_type=graph.atom_type, bond_type=graph.bond_type,
54 residue_type=graph.residue_type, atom_name=graph.atom_name, atom2residue=graph.atom2residue,
55 residue_feature=graph.residue_feature, b_factor=graph.b_factor, bond_feature=None,
56 node_position=graph.node_position, num_node=graph.num_atom, num_residue=graph.num_residue,
57 )
58 else:
59 # surface graph
60 _graph = data.Graph(edge_list=graph.edge_list, num_node=graph.num_node, num_relation=1)
61 with _graph.node():
62 _graph.node_position = graph.node_position
63 _graph.node_feature = graph.node_feature
64 _graph.normals = graph.normals
65 return _graph
66
67
68def get_optimal_window(mutation_position_relative, seq_len_wo_special, model_window):

Callers 1

evaluate.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected