sokrypton / ColabDesign

Making Protein Design accessible to all via Google Colab!
Other
632 stars 149 forks source link

fix_pos in af/fixbb #155

Open dandaman opened 1 year ago

dandaman commented 1 year ago

Dear developers,

I'm trying to use ColabDesign AF to design a sequence using the fixbb protocol fixing sites with a list of positions as follows:

model = mk_afdesign_model(protocol="fixbb")
model.prep_inputs(pdb_filename="mystruc.pdb", chain="A",fix_pos="10,14,22,31,46,48,56,58,60,77,79,81,131,133,141,143,145,153,155,157,164,166,168")
model.restart()
model.design_3stage()
seq=SeqRecord(Seq(model.get_seqs()[0]),id=f"design{i}",description="")
model.save_pdb(f"fixed/org/design{i}.{model.protocol}.pdb")

I've assumed the positions need to 0-based. Is that correct?

I must be doing something wrong as the resulting sequence differs from the input pdb protein sequence in the sites given to fix_pos?

Any hint would be greatly appreciated.

Best, Daniel

sokrypton commented 1 year ago

The fix_pos uses PDB numbering (so that would be 1-index for most PDBs)

dandaman commented 1 year ago

@sokrypton, thank you for clearing this up.

So if I use 1-based cords the above code should always result in sequence designs that are identical to the Input pdb seq sites given via fix_pos?

Or are there situations the algorithm/model will change the site anyway?