Question: Incompatibility between BioPython SeqIO module and pymol?
gravatar for lqdo2000
6.1 years ago by
lqdo200020 wrote:


I am trying to generate .pdb files from fasta sequences using BioPython SeqIO module to parse them to Pymol, and fab command:

from Bio import SeqIO
for seq_record in SeqIO.parse(file, "fasta"):"fab %s, %s" % (seq_record.seq,"%s.pdb" %, "all")

The script produces the files without displaying any errors, but they are either empty or the sequence is incomplete.

Does someone already encounter this problem? Is something wrong with my script?

Thanks !


Note: the exact same happens if I include a handle for the SeqIO module.

biopython pymol python • 2.0k views
ADD COMMENTlink modified 5.9 years ago by Biostar ♦♦ 20 • written 6.1 years ago by lqdo200020

Are there any errors in a log file? You have at least one mistake which will break your script, seq_record_seq should probably be seq_record.seq

ADD REPLYlink modified 6.1 years ago • written 6.1 years ago by Peter5.8k

Sorry, for seq_record_seq it was a typo (corrected).

The stout doesn't return any error (same when I use the other syntax:"save %s.pdb, all" %

But when I use this syntax, it returns that the number of selected atoms is either "0" or lower then the total sequence.

ADD REPLYlink modified 6.1 years ago • written 6.1 years ago by lqdo200020
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1629 users visited in the last hour