Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DeepGraphLearning/S3F
/ functions
Functions
80 in github.com/DeepGraphLearning/S3F
⨍
Functions
80
◇
Types & classes
15
↓ 5 callers
Method
__init__
(self, in_dims, out_dims, h_dim=None, activations=(F.relu, torch.sigmoid), vector_gate=False)
s3f/gvp_layer.py:102
↓ 5 callers
Function
soft_distances
Computes a soft distance function to the atom centers of a protein. Implements Eq. (1) of the paper in a fast and numerically stable way. Ar
s3f/surface.py:156
↓ 4 callers
Function
tuple_index
Indexes into a tuple (s, V) along the first dimension. :param idx: any object which can be used to index into a `torch.Tensor`
s3f/gvp_layer.py:32
↓ 3 callers
Function
_norm_no_nan
L2 norm of tensor clamped above a minimum value `eps`. :param sqrt: if `False`, returns the square of the L2 norm
s3f/gvp_layer.py:55
↓ 3 callers
Function
rbf
(d, d_min=0.0, d_max=20.0, dim=16)
s3f/gvp.py:14
↓ 3 callers
Function
tuple_sum
Sums any number of tuples (s, V) elementwise.
s3f/gvp_layer.py:11
↓ 2 callers
Function
diagonal_ranges
Encodes the block-diagonal structure associated to a batch vector.
s3f/surface.py:30
↓ 2 callers
Function
graph_concat
(graphs)
script/evaluate.py:47
↓ 2 callers
Function
ranges_slices
Helper function for the diagonal ranges function.
s3f/surface.py:13
↓ 1 callers
Method
__init__
(self, node_in_dim, node_h_dim, edge_in_dim, edge_h_dim, readout="sum", num
s3f/gvp.py:185
↓ 1 callers
Function
_make_standard_atom_mask
Returns [num_res_types, num_atom_types] mask array.
s3f/residue_constants.py:76
↓ 1 callers
Function
_merge
Merges a tuple (s, V) into a single `torch.Tensor`, where the vector channels are flattened and appended to the scalar channels. Should b
s3f/gvp_layer.py:79
↓ 1 callers
Function
_split
Splits a merged representation of (s, V) back into a tuple. Should be used only with `_merge(s, V)` and only if the tuple representatio
s3f/gvp_layer.py:65
↓ 1 callers
Method
assign_structure
(self, sequence_graph, structure_graph)
s3f/dataset.py:102
↓ 1 callers
Function
curvatures
( vertices, triangles=None, scales=[1.0], batch=None, normals=None, reg=1e-10 )
s3f/surface.py:415
↓ 1 callers
Function
detect_variables
(cfg_file)
util.py:67
↓ 1 callers
Function
evaluate
(pred, target)
script/evaluate.py:28
↓ 1 callers
Function
get_optimal_window
(mutation_position_relative, seq_len_wo_special, model_window)
script/evaluate.py:68
↓ 1 callers
Function
get_prob
(seq_prob, mutations, offsets)
script/evaluate.py:96
↓ 1 callers
Method
inference
(self, batch)
s3f/task.py:75
↓ 1 callers
Function
load_dataset
(csv_file, protein)
script/evaluate.py:126
↓ 1 callers
Function
load_protein
(file)
script/preload_dataset.py:12
↓ 1 callers
Function
load_protein
(data_dict)
s3f/dataset.py:140
↓ 1 callers
Function
load_surface
(surf_dict)
s3f/dataset.py:177
↓ 1 callers
Function
mesh_normals_areas
(vertices, triangles=None, scale=[1.0], batch=None, normals=None)
s3f/surface.py:347
↓ 1 callers
Function
mutation_site
(x)
script/evaluate.py:140
↓ 1 callers
Function
predict
(cfg, task, dataset)
script/evaluate.py:80
↓ 1 callers
Method
preprocess
(self, train_set, valid_set, test_set)
s3f/task.py:24
↓ 1 callers
Function
process
(input_dir, output_dir, pkl_file)
script/process_surface.py:19
↓ 1 callers
Method
residue2surface
(self, graph, surf_graph)
s3f/gvp.py:97
↓ 1 callers
Function
subsample
Subsamples the point cloud using a grid (cubic) clustering scheme. The function returns one average sample per cell, as described in Fig. 3.e)
s3f/surface.py:107
↓ 1 callers
Method
surface_feature_init
(self, graph, surf_graph, input)
s3f/gvp.py:102
↓ 1 callers
Function
tangent_vectors
(normals)
s3f/surface.py:404
↓ 1 callers
Method
to_dict
(self)
s3f/protein.py:68
↓ 1 callers
Function
train_and_validate
(cfg, solver)
script/pretrain.py:18
↓ 1 callers
Method
truncate
(self, sequence_graph, structure_graph, surface_graph=None)
s3f/dataset.py:82
↓ 1 callers
Method
truncate
(self, data_dict, surf_dict=None)
s3f/dataset.py:211
↓ 1 callers
Function
tuple_cat
Concatenates any number of tuples (s, V) elementwise. :param dim: dimension along which to concatenate when viewed as th
s3f/gvp_layer.py:18
Method
__getitem__
(self, index)
s3f/dataset.py:110
Method
__init__
(self, model, mask_rate=0.15, dropout=0.5, graph_construction_model=None, plddt_threshold=None)
s3f/task.py:13
Method
__init__
(self, node_in_dim, node_h_dim, edge_in_dim, edge_h_dim, surf_in_dim, surf_edge_in_dim,
s3f/gvp.py:27
Method
__init__
(self, path, csv_file)
s3f/dataset.py:59
Method
__init__
(self, mutated_sequences, wild_type, surf_graph=None, transform=None)
s3f/dataset.py:73
Method
__init__
(self, path, max_length=None, surf_path=None, transform=None)
s3f/dataset.py:200
Method
__init__
(self, drop_rate)
s3f/gvp_layer.py:161
Method
__init__
(self, drop_rate)
s3f/gvp_layer.py:185
Method
__init__
(self, dims)
s3f/gvp_layer.py:207
Method
__init__
(self, in_dims, out_dims, edge_dims, n_layers=3, module_list=None, aggr="mean",
s3f/gvp_layer.py:246
Method
__init__
(self, node_dims, edge_dims, n_message=3, n_feedforward=2, drop_rate=.1, aut
s3f/gvp_layer.py:314
Method
__init__
(self, sequence_model, structure_model)
s3f/model.py:78
Method
__len__
(self)
s3f/dataset.py:79
Method
__len__
(self)
s3f/dataset.py:257
Method
__post_init__
(self)
s3f/protein.py:62
Method
__repr__
(self)
s3f/dataset.py:260
Function
atoms_to_points_normals
Turns a collection of atoms into an oriented point cloud. Sampling algorithm for protein surfaces, described in Fig. 3 of the paper. Args:
s3f/surface.py:223
Function
bio_load_pdb
(pdb)
s3f/dataset.py:26
Function
build_solver
(cfg, dataset)
util.py:86
Function
compute_HKS
(eigen_vecs, eigen_vals, num_t, t_min=0.1, t_max=1000, scale=1000)
s3f/surface.py:76
Function
compute_curvatures
(xyz, normals, batch, curvature_scales)
s3f/surface.py:92
Function
compute_eigens
(n_verts, xyz, min_n_eigs, eigs_ratio)
s3f/surface.py:63
Function
create_working_directory
(cfg)
util.py:35
Method
forward
(self, graph, input, surf_graph, all_loss=None, metric=None)
s3f/gvp.py:124
Method
forward
(self, graph, input, all_loss=None, metric=None)
s3f/gvp.py:222
Method
forward
:param x: tuple (s, V) of `torch.Tensor`, or (if vectors_in is 0), a single `torch.Tensor` :return: tuple (s, V) o
s3f/gvp_layer.py:120
Method
forward
:param x: `torch.Tensor` corresponding to vector channels
s3f/gvp_layer.py:166
Method
forward
:param x: tuple (s, V) of `torch.Tensor`, or single `torch.Tensor` (will be assumed to be scalar channel
s3f/gvp_layer.py:190
Method
forward
:param x: tuple (s, V) of `torch.Tensor`, or single `torch.Tensor` (will be assumed to be scalar channel
s3f/gvp_layer.py:212
Method
forward
:param x: tuple (s, V) of `torch.Tensor` :param edge_index: array of shape [2, n_edges] :param edge_attr: tuple (s, V) of `to
s3f/gvp_layer.py:273
Method
forward
:param x: tuple (s, V) of `torch.Tensor` :param edge_index: array of shape [2, n_edges] :param edge_attr: tuple (s, V) of `to
s3f/gvp_layer.py:339
Method
forward
Compute the residue representations and the graph representation(s). Parameters: graph (Protein): :math:`n` protein(s)
s3f/model.py:15
Method
forward
(self, graph, input, all_loss=None, metric=None, batch=None)
s3f/model.py:84
Function
from_pdb_string
Takes a PDB string and constructs a Protein object. WARNING: All non-standard residue types will be converted into UNK. All non-standard atoms
s3f/protein.py:72
Method
get_item
(self, idx)
s3f/dataset.py:234
Function
get_root_logger
(file=True)
util.py:22
Function
knn_atoms
(x, y, k, batch_x=None, batch_y=None)
s3f/surface.py:43
Function
load_config
(cfg_file, context=None)
util.py:76
Method
message
(self, s_i, v_i, s_j, v_j, edge_attr)
s3f/gvp_layer.py:285
Function
parse_args
()
util.py:116
Method
predict_and_target
(self, batch, all_loss=None, metric=None)
s3f/task.py:27
Function
randn
Returns random tuples (s, V) drawn elementwise from a normal distribution. :param n: number of data points :param dims: tuple of dim
s3f/gvp_layer.py:41