Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes padding in pNerF computations #320

Merged
merged 54 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
176d884
add PSW to nonstandard residues
a-r-j Apr 17, 2023
fa89a37
improve insertion and non-standard residue handling
a-r-j Apr 17, 2023
9855b9b
refactor chain selection
a-r-j Apr 17, 2023
f143719
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 17, 2023
3f3b3d9
remove unused verbosity arg
a-r-j Apr 17, 2023
09f05e5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 17, 2023
b7475df
fix chain selection in tests
a-r-j Apr 17, 2023
2e0a371
Merge branch 'tensor_fixes' of https://www.github.com/a-r-j/graphein …
a-r-j Apr 17, 2023
d2c1808
fix chain selection in tutorial notebook
a-r-j Apr 17, 2023
fc332c6
fix notebook chain selection
a-r-j Apr 17, 2023
4a67851
fix chain selection typehint
a-r-j Apr 17, 2023
5f648d2
Update changelog
a-r-j Apr 17, 2023
ab26d78
Add NLW to non-standard residues
a-r-j Apr 17, 2023
a449bba
Merge branch 'tensor_fixes' of https://www.github.com/a-r-j/graphein …
a-r-j Apr 17, 2023
afc0f8b
add .ent support
a-r-j Apr 20, 2023
258c94d
add entry for construction from dataframe
a-r-j Apr 20, 2023
c9856ae
add missing stage arg
a-r-j Apr 20, 2023
9e1191a
improve obsolete mapping retrieving to include entries with no replac…
a-r-j Apr 20, 2023
17c38ab
Merge branch 'master' into tensor_fixes
a-r-j Apr 20, 2023
7bf4ff3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 20, 2023
5af9e06
update changelog
a-r-j Apr 21, 2023
e00bdfb
add transforms to foldcomp datasets
a-r-j Apr 22, 2023
31018bc
fix jaxtyping syntax
a-r-j Apr 25, 2023
6e26455
Merge branch 'tensor_fixes' of https://www.github.com/a-r-j/graphein …
a-r-j Apr 25, 2023
3681714
Merge branch 'master' into tensor_fixes
a-r-j Apr 27, 2023
adbdbe1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 27, 2023
50ac31b
Update changelog
a-r-j Apr 27, 2023
088ae02
fix double application of transforms
a-r-j Apr 27, 2023
fb684af
improve foldcomp data loading performance
a-r-j May 1, 2023
a543a75
Merge branch 'tensor_fixes' of https://www.github.com/a-r-j/graphein …
a-r-j May 1, 2023
a00e2be
Merge branch 'master' into tensor_fixes
a-r-j May 1, 2023
ccf0437
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 1, 2023
7939a82
remove unused imports
a-r-j May 1, 2023
d72abf9
remove unused imports
a-r-j May 1, 2023
8b551c7
linting
a-r-j May 1, 2023
86bedcf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 1, 2023
685d3db
Update changelog
a-r-j May 1, 2023
bebc3c4
add B factors to FC parsing output
a-r-j May 2, 2023
c973422
Merge branch 'tensor_fixes' of https://www.github.com/a-r-j/graphein …
a-r-j May 2, 2023
828af29
bugfix to alpha & kappa angle embedding
a-r-j May 7, 2023
c986df0
Merge branch 'master' into tensor_fixes
a-r-j May 7, 2023
6c48878
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 7, 2023
fc7657e
update changelog
a-r-j May 7, 2023
7192613
handle selenocysteine in sidechain torsion angle computation
a-r-j May 10, 2023
6a31729
Merge branch 'tensor_fixes' of https://www.github.com/a-r-j/graphein …
a-r-j May 10, 2023
84fc3e4
fix protein data object initialisation #317
a-r-j May 10, 2023
9dcc1c7
Merge branch 'master' into protein_obj
a-r-j May 10, 2023
f5d1f26
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 10, 2023
6269d25
restore eq dunder
a-r-j May 10, 2023
d96d60f
update changelog
a-r-j May 10, 2023
dcc82dd
add x to foldcomp examples for correct batching
a-r-j May 19, 2023
d70959f
Merge branch 'protein_obj' of https://www.github.com/a-r-j/graphein i…
a-r-j May 19, 2023
0ddb666
fix pnerf padding
a-r-j May 22, 2023
9c785b1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Fixes bug with exporting PDBs with only one splitting strategy in PDBManager [#311](https://github.com/a-r-j/graphein/pull/311)
* Fixes incorrect jaxtyping syntax for variable size dimensions [#312](https://github.com/a-r-j/graphein/pull/312)
* Fixes shape of angle embeddings for `graphein.protein.tesnor.angles.alpha/kappa`. [#315](https://github.com/a-r-j/graphein/pull/315)
* Fixes initialisation of `Protein` objects. [#317](https://github.com/a-r-j/graphein/issues/317) [#318](https://github.com/a-r-j/graphein/pull/318)

#### Other Changes
* Adds entry point for biopandas dataframes in `graphein.protein.tensor.io.protein_to_pyg`. [#310](https://github.com/a-r-j/graphein/pull/310)
Expand Down
1 change: 1 addition & 0 deletions graphein/ml/datasets/foldcomp_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ def fc_to_pyg(data: Dict[str, Any], name: Optional[str] = None) -> Protein:
residue_type=residue_type.long(),
b_factor=torch.from_numpy(b_factor).float(),
id=name,
x=torch.zeros(len(res)),
)

def len(self) -> int:
Expand Down
8 changes: 7 additions & 1 deletion graphein/protein/tensor/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ class Protein(Data):
"""

def __init__(
self, atom_list: List[str] = PROTEIN_ATOMS, fill_value: float = 1e-5
self,
atom_list: List[str] = PROTEIN_ATOMS,
fill_value: float = 1e-5,
**kwargs,
) -> None:
"""
.. seealso::
Expand All @@ -145,10 +148,13 @@ def __init__(
:param fill_value: Value to fill in for missing values in the
AtomTensor.
:type fill_value: float
:param kwargs: Additional keyword arguments to store as attributes.
"""
super().__init__()
self.fill_value = fill_value
self.atom_list = atom_list
for k, v in kwargs.items():
setattr(self, k, v)

# I/O
def from_dataframe(
Expand Down
9 changes: 5 additions & 4 deletions graphein/protein/tensor/pnerf.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,13 +277,14 @@ def extend(prev_three_coords, point, multi_m):
)
coords_trans = torch.cat([coords_pretrans[i], transformed_coords], 0)

# coords = F.pad(
# coords_trans[: total_num_angles - 1], (0, 0, 0, 0, 1, 0)
# ) # original
coords = F.pad(
coords_trans[: total_num_angles - 1], (0, 0, 0, 0, 1, 0)
) # original
# coords = F.pad(coords_trans[: total_num_angles - 2], (0, 0, 0, 0, 2, 0))
# coords = F.pad(coords_trans[: total_num_angles - 3], (0, 0, 0, 0, 3, 0))
# return coords
return coords_trans
# return coords_trans
return coords


def sn_nerf(
Expand Down