steineggerlab / foldseek

Foldseek enables fast and sensitive comparisons of large structure sets.
https://foldseek.com
GNU General Public License v3.0
693 stars 91 forks source link

How to convert the 3D descriptors back to PDB file? #273

Closed AaranWang closed 1 month ago

AaranWang commented 1 month ago

I utilized FoldSeek to convert PDB/CIF files into 3D descriptors for deep learning applications. However, I encountered an obstacle in converting these descriptors back into a PDB file.

Here's the command I initially used to convert the PDB file to 3D descriptors:

"foldseek structureto3didescriptor -v 0 --threads 1 --chain-name-mode 1 example/1j3r_27.pdb get_struc_seq_0.tsv"

Subsequently, I attempted to convert the 3D descriptors back to a PDB file using the following command:

"foldseek convert2pdb get_struc_seq_0.tsv.dbtype test.pdb"

Unfortunately, I received an error stating "Database get_struc_seq_0.tsv.dbtype needs header information."

Could you please advise on how to resolve this issue? Any assistance would be greatly appreciated. Thank you.

milot-mirdita commented 1 month ago

3Di does not have sufficient information to restore the original atomic coordinates.

If you just want a more space efficient format than PDB/mmCIF, I recommend looking at our foldcomp project at foldcomp.foldseek.com

milot-mirdita commented 1 month ago

If you created a Foldseek database with createdb, then you can convert back to a backbone only PDB file, since we also store C-alpha. For this pass the path to the Foldseek database (without the .dbtype suffix).

This does not work with the structureto3didescriptor module.

AaranWang commented 1 month ago

If you created a Foldseek database with createdb, then you can convert back to a backbone only PDB file, since we also store C-alpha. For this pass the path to the Foldseek database (without the .dbtype suffix).

This does not work with the structureto3didescriptor module.

Thanks.