sokrypton / sokrypton/ColabFold

Amber works in AlphaFold2_mmseqs2 but not in AlphaFold2_batch

Open
#47 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
2.9k
Forks
747
PR merge metrics
No merged PRs in 30d

Description

When I try to run the predefined example sequence (PIAQIHILEGRSDEQKETLIREVSEAISRSLDAPLTSVRVIITEMAKGHFGIGGELASK) with templates, one model and amber it works in AlphaFold2_mmseqs2, but fails in AlphaFold2_batch with the following error:

ValueError                                Traceback (most recent call last)

<ipython-input-3-a76dac23e0b1> in <module>()
    391                            Ls=[len(query_sequence)], crop_len=crop_len,
    392                            model_params=model_params, use_model=use_model,
--> 393                            do_relax=use_amber)
    394 
    395   # gather MSA info

<ipython-input-3-a76dac23e0b1> in predict_structure(prefix, feature_dict, Ls, crop_len, model_params, use_model, do_relax, random_seed)
    276                                               stiffness=10.0,exclude_residues=[],
    277                                               max_outer_iterations=20)      
--> 278         relaxed_pdb_str, _, _ = amber_relaxer.process(prot=unrelaxed_protein)
    279         relaxed_pdb_lines.append(relaxed_pdb_str)
    280 

/content/alphafold/relax/relax.py in process(self, prot)
     62         tolerance=self._tolerance, stiffness=self._stiffness,
     63         exclude_residues=self._exclude_residues,
---> 64         max_outer_iterations=self._max_outer_iterations)
     65     min_pos = out['pos']
     66     start_pos = out['posinit']

/content/alphafold/relax/amber_minimize.py in run_pipeline(prot, stiffness, max_outer_iterations, place_hydrogens_every_iteration, max_iterations, tolerance, restraint_set, max_attempts, checks, exclude_residues)
    459   # `protein.to_pdb` will strip any poorly-defined residues so we need to
    460   # perform this check before `clean_protein`.
--> 461   _check_residues_are_well_defined(prot)
    462   pdb_string = clean_protein(prot, checks=checks)
    463 

/content/alphafold/relax/amber_minimize.py in _check_residues_are_well_defined(prot)
    139   """Checks that all residues contain non-empty atom sets."""
    140   if (prot.atom_mask.sum(axis=-1) == 0).any():
--> 141     raise ValueError("Amber minimization can only be performed on proteins with"
    142                      " well-defined residues. This protein contains at least"
    143                      " one residue with no atoms.")

ValueError: Amber minimization can only be performed on proteins with well-defined residues. This protein contains at least one residue with no atoms.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the AlphaFold2_mmseqs2 and AlphaFold2_batch execution paths, then reproduce the predefined sequence with templates, one model, and Amber. Start with relax/relax.py and relax/amber_minimize.py at the failing residue check. Done means the batch path completes Amber relaxation for this input without the well-defined-residue error.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, python
Domain
bioinformatics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.