bsitep package

Subpackages

Submodules

bsitep.proteindata module

class bsitep.proteindata.Featurizer(atom_codes=None, atom_labels=None, named_properties=None, save_molecule_codes=True, custom_properties=None, smarts_properties=None, smarts_labels=None)[source]

Bases: object

compile_smarts()[source]
encode_num(atomic_num)[source]
find_smarts(molecule)[source]
static from_pickle(fname)[source]
get_binary_features(mol)[source]
get_features(molecule, molcode=None)[source]
get_features_gt(molecule, molcode=None)[source]
to_pickle(fname='featurizer.pkl')[source]
class bsitep.proteindata.proteinDataset(data_path, featurizer=<bsitep.proteindata.Featurizer object>, max_dist=35, eval=True, scale=0.5, max_translation=5, kfold_ind=0)[source]

Bases: Dataset

feed_data(mol1, mol2, rotation=0, translation=(0, 0, 0))[source]
make_grid(coords, features, grid_resolution=1.0, max_dist=10.0)[source]
rotate(coords, rotation)[source]
rotation_matrix(axis, theta)[source]
class bsitep.proteindata.proteinDataset_predict(data_path, featurizer=<bsitep.proteindata.Featurizer object>, max_dist=35, scale=0.5, max_translation=5, file_format='mol2')[source]

Bases: Dataset

feed_data(mol1)[source]
make_grid(coords, features, grid_resolution=1.0, max_dist=10.0)[source]

bsitep.seresnet module

class bsitep.seresnet.ChannelSELayer3D(num_channels, reduction_ratio=2)[source]

Bases: Module

3D extension of Squeeze-and-Excitation (SE) block described in:

Hu et al., Squeeze-and-Excitation Networks, arXiv:1709.01507 Zhu et al., AnatomyNet, arXiv:arXiv:1808.05238

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class bsitep.seresnet.ChannelSpatialSELayer3D(num_channels, reduction_ratio=2)[source]

Bases: Module

3D extension of concurrent spatial and channel squeeze & excitation:

Roy et al., Concurrent Spatial and Channel Squeeze & Excitation in Fully Convolutional Networks, arXiv:1803.02579

forward(input_tensor)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class bsitep.seresnet.ConvolutionBlock(strides, channels)[source]

Bases: Module

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class bsitep.seresnet.IdentityBlock(channels, layer=None)[source]

Bases: Module

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class bsitep.seresnet.SEResNet[source]

Bases: Module

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

class bsitep.seresnet.SpatialSELayer3D(num_channels)[source]

Bases: Module

3D extension of SE block – squeezing spatially and exciting channel-wise described in:

Roy et al., Concurrent Spatial and Channel Squeeze & Excitation in Fully Convolutional Networks, MICCAI 2018

forward(x, weights=None)[source]
Parameters:
  • weights (torch.Tensor) – weights for few shot learning

  • x – X, shape = (batch_size, num_channels, D, H, W)

Returns:

output_tensor

Return type:

(torch.Tensor)

class bsitep.seresnet.UpSamplingBlock(channels, stride, size, padding='same', layer=None)[source]

Bases: Module

forward(x)[source]

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Module contents