README.md 1.95 KB
Newer Older
Dingquan Yu's avatar
Dingquan Yu committed
1
# Permutation code README
2

Dingquan Yu's avatar
Dingquan Yu committed
3
## Overview:
Dingquan Yu's avatar
Dingquan Yu committed
4
5
6
7

NB: before running the test codes,please download the procrustes package first:
from https://github.com/theochem/procrustes

Dingquan Yu's avatar
Dingquan Yu committed
8
9
10
11
12
To test the permutation codes:
```bash
python -m unittest tests/test_permutation.py
```
The files that has been changed is:
Dingquan Yu's avatar
Dingquan Yu committed
13
[```openfold/utils/loss.py```](https://github.com/dingquanyu/openfold/blob/permutation/openfold/utils/loss.py), in which the forward function is modified in 
Dingquan Yu's avatar
Dingquan Yu committed
14
15
16
17
18
original ```AlphaFoldLoss``` class; 

create a child class called ```AlphaFoldMultimerLoss``` that not only inherited all the loss calculations but also 
has multi-chain permutation codes; 

Dingquan Yu's avatar
Dingquan Yu committed
19
some loss calculations have to be modified e.g. in ```fape``` loss, ```tm``` loss calculations, an extra validation was added to check if the input tensor belongs to tensor_7 or tensor_4*4 for example : https://github.com/dingquanyu/openfold/blob/02b008dc4b8c2e9e680826444c605297eeb9ffb4/openfold/utils/loss.py#L190-L193
Dingquan Yu's avatar
Dingquan Yu committed
20
21
22

[```openfold/config.py```](https://github.com/dingquanyu/openfold/blob/permutation/openfold/config.py) has seen a couple of modifications as well. Some namings were wrong and previous script forgot to update  config.loss with multimer_model_config_update

23

Dingquan Yu's avatar
Dingquan Yu committed
24
25
26
These files are newly added:
[```tests/test_permutation.py```](https://github.com/dingquanyu/openfold/blob/permutation/tests/test_permutation.py): A unittest script 
that tests permutation functions.
Gustaf Ahdritz's avatar
Gustaf Ahdritz committed
27

Dingquan Yu's avatar
Dingquan Yu committed
28
29
30
[```tests/test_data/label_1.pkl```](https://github.com/dingquanyu/openfold/blob/permutation/tests/test_data/label_1.pkl) 
and [```tests/test_data/label_2.pkl```](https://github.com/dingquanyu/openfold/blob/permutation/tests/test_data/label_2.pkl) are 2 fake ground truth structures.
```label_1.pkl``` has 9 residues and ```label_2.pkl``` has 13 residues
Dingquan Yu's avatar
Dingquan Yu committed
31
### Notes
Dingquan Yu's avatar
Dingquan Yu committed
32
33
29/06/23 Fill NaN in the lddt scores with the matrix mean for now because the test data are randomly generated and it gives NaN in the lddt score somehow.
**Delete** this step before merging to Multimer branch