Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Evry-Paris-Saclay
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
2024 Competition
Software Tools
Evry-Paris-Saclay
Commits
2ac848fb
Commit
2ac848fb
authored
5 months ago
by
paradoxe-tech
Browse files
Options
Downloads
Patches
Plain Diff
precision of function signatures
parent
71baee4f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
model/Model.py
+3
-3
3 additions, 3 deletions
model/Model.py
model/featurize.py
+14
-14
14 additions, 14 deletions
model/featurize.py
with
17 additions
and
17 deletions
model/Model.py
+
3
−
3
View file @
2ac848fb
...
...
@@ -10,9 +10,9 @@ class Model:
The mutant generation model constructor. This method does the setup of
torch and CUDA environment, loads the checkpoint and then returns a PocketGen
instance using the weights from checkpoints and the parameters retrieved.
@param checkpoint_path: Path to checkpoint (.pt) file for PocketGen.
@param verbose: 0 for quiet, 1 for necessary information and 2 for debug.
@return: the instance of Model, for chainability purposes.
@param checkpoint_path
(str)
: Path to checkpoint (.pt) file for PocketGen.
@param verbose
(int)
: 0 for quiet, 1 for necessary information and 2 for debug.
@return
(Model)
: the instance of Model, for chainability purposes.
"""
# setup global class variables
...
...
This diff is collapsed.
Click to expand it.
model/featurize.py
+
14
−
14
View file @
2ac848fb
...
...
@@ -5,8 +5,8 @@ import torch
def
densify
(
data
:
dict
)
->
torch
.
Tensor
:
"""
Transforms a set of human-level features to a dense data tensor.
@param data: a feature-dict returned by featurize()
@return: a dense-data torch tensor representing features.
@param data
(dict)
: a feature-dict returned by featurize()
@return
(torch.Tensor)
: a dense-data torch tensor representing features.
"""
return
Compose
([
...
...
@@ -20,19 +20,19 @@ def featurize(
ligand_dict
=
{},
residue_dict
=
{},
seq
=
None
,
full_seq_i
d
x
=
None
,
r10_i
d
x
=
None
)
->
dict
:
full_seq_i
nde
x
=
None
,
r10_i
nde
x
=
None
)
->
dict
:
"""
Transforms
a 3-uplet of molecule dicts
into a feature
s
Transforms
molecule interaction data
into a feature
dict that is interpretable by the densify function.
@param protein_dict
: #################
@param ligand_dict
: #################
@param residue_dict
: #################
@param seq: #################
@param full_seq_i
dx
: #################
@param r10_i
dx: #################
@return
: #################
@param protein_dict
(dict): a dictionary representation of the receptor
@param ligand_dict
(dict): a dictionary representation of the ligand
@param residue_dict
(dict): a dictionary representation of the residue
@param seq
(str)
: #################
@param full_seq_i
ndex (torch.Tensor)
: #################
@param r10_i
ndex (torch.Tensor): indexes of the residues (r < 10 around ligand)
@return
(dict): a feature dictionnary
"""
# concatenate the first 3 dicts (prot, lig and residue)
...
...
@@ -42,8 +42,8 @@ def featurize(
# add keys for simple variables
features
.
update
({
'
full_seq_i
d
x
'
:
full_seq_i
d
x
,
'
r10_i
d
x
'
:
r10_i
d
x
,
'
full_seq_i
nde
x
'
:
full_seq_i
nde
x
,
'
r10_i
nde
x
'
:
r10_i
nde
x
,
'
seq
'
:
seq
})
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment