google-deepmind / google-deepmind/alphafold

Features for minimal input?

Open
#843 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
14.9k
Forks
2.9k
PR merge metrics
No merged PRs in 30d

Description

I am trying to create a simple input just to test the model and make sure I understand everything correctly. I just want to have 3 amnio acids as input and nothing else.

So here is my code so far:

```
from alphafold.model import model
from alphafold.model import config
from alphafold.model import data
import random
import sys

model_name = "model_1"
Nres=3
Nextra=1
features = {
'seq_length':[Nres]*Nres,
'aatype':[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]*Nres],
'sequence':[4,5,6],
'msa':[[[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]*Nres]*Nextra]
}
cfg = config.model_config(model_name)

params = data.get_model_haiku_params(model_name, 'alphafold/data')
model_runner = model.RunModel(cfg, params)

processed_feature_dict = model_runner.process_features(features , random_seed=0)
prediction = model_runner.predict(processed_feature_dict, random_seed=random.randrange(sys.maxsize))
print(prediction)
```

Obviously this doesn't work as I don't have the features struct correct. Can you suggest some minimal features to get this working?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.