[BioPython] Automated ligand extraction from PDB
Peter
biopython at maubp.freeserve.co.uk
Fri Oct 20 09:21:39 UTC 2006
Tomek Jarzynka wrote:
> Hi,
>
> I would like to create a script that would take a PDB file as input,
> try and identify the ligand structures and delete them from the PDB
> file. I figured this would be possible with Biopython by looking at
> the atom id (whether it contains 'H_') and subclassing Select to
> not allow those items to be written to a file.
> Is there any more elegant way of doing this, perhaps another PDB parser
> framework, or maybe someone has already done similar work?
>
> Thanks in advance,
You plan sounds fine.
If you are going to use BioPython to analyse PDB files later, then this
would be a good exercise to get to grips with it.
Also, using the BioPython PDB parser in strict mode (non-permissive)
then it may also flag up some potential problems in the PDB file which
you may be interested in for you work.
A quick and dirty alternative would be to read in the input file line by
line, and output selected lines:
* If is not an atom record, just output it.
* If is is an atom record, look at the atom id to decide.
Peter
More information about the Biopython
mailing list