[Biopython-dev] Questions on StructureBuilder, MMCIFParser, and MMCIFlex
Paul B
tallpaulinjax at yahoo.com
Tue Nov 3 12:34:46 EST 2009
>Are you sure it should it be 1 and not 0? Remember, Python counts from zero.
If the MODEL record in the .ent record says MODEL 1, should biopython report it as 0? In PDBParser, the code is as follows:
current_model_id=0
# Flag we have an open model
model_open=0
for i in range(0, len(coords_trailer)):
if(record_type=='ATOM ' or record_type=='HETATM'):
# Initialize the Model - there was no explicit MODEL record
if not model_open:
structure_builder.init_model(current_model_id)
current_model_id+=1
model_open=1
--- On Tue, 11/3/09, Peter <biopython at maubp.freeserve.co.uk> wrote:
From: Peter <biopython at maubp.freeserve.co.uk>
Subject: Re: [Biopython-dev] Questions on StructureBuilder, MMCIFParser, and MMCIFlex
To: "Paul B" <tallpaulinjax at yahoo.com>
Cc: biopython-dev at biopython.org
Date: Tuesday, November 3, 2009, 12:13 PM
On Tue, Nov 3, 2009 at 4:36 PM, Paul B <tallpaulinjax at yahoo.com> wrote:
>
> Hi,
>
> I have found the reason why MMCIParser is dying. It has no provision
> for more than one model, so when a second model comes around with
> the same chain and residue the program throws an exception.
Please file a bug report on bugzilla for that. I guess no-one has tried
NMR CIF data with the parser before (!).
> I will be joining github to submit the required changes. I haven't used
> github before, and this is my first open source project so please give
> me a few days to acclimate.
I you like - great. Otherwise we can manage with patches via an
enhancement bug on bugzilla.
> My mods so far are as follows in MMCIFParser.py (and require the
> MMCIFlex.py and MMCIF2Dict.py files I will be submitting via github,
> and have submitted to Peter privately.)
Actually, I think that ended up on mailing list:
http://lists.open-bio.org/pipermail/biopython-dev/2009-November/006938.html
> The only difference is the PDBParser incorrectly states the first model as 0
> when it should be 1: there is an explicit MODEL line in pdb2beg.ent. So all
> the models are off by one in 2beg when parsed by PDBParser.py. I can
> look into the bug in PDBParser.py and submit it if desired?
Are you sure it should it be 1 and not 0? Remember, Python counts from zero.
Peter
More information about the Biopython-dev
mailing list