[BioPython] bio.pdb.mmcif does not exist

Peter biopython at maubp.freeserve.co.uk
Wed May 9 13:01:56 UTC 2007


Alex Lancaster wrote:
> On this issue, it appears that in biopython 1.43 compilation of the
> mmCIF module is actually commented-out in the setup.py (which would
> account for the lack of the Bio.PDB.mmCIF module noted by Jean, even
> if flex was installed).

Well spotted - I had forgotten about that!

 > It was removed in this commit:
> 
> http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/setup.py.diff?r1=1.108&r2=1.109&cvsroot=biopython
> 
> with the somewhat confusing note:
> 
> "Uncommented mmCIF module because of problems if GNU's Flex is
> missing"
> 
> because it actually commented it out, not uncommented it! ;)

That does sound like a simple typing error given the change made.

 > It seems
> to me that the setup.py should test whether GNU Flex is there and then
> enable the module compilation if it is (as is done for reportlab),
> rather than force the user to uncomment sections in the setup.py.  

That sounds reasonable - do you happen to know how to check for the flex 
headers cleanly?

The way the setup.py script prompts the user about building Bio.KDTree 
with a simple yes/no prompt is a simple short term solution.  I could 
certainly manage to make that change.

------------------------------------------------------------------------

Jean - this issue had slipped my mind (but I don't use this module). If 
you edit the setup.py file to uncomment the mmCIF extension lines, and 
retry the build/install that should fix your missing module problem:

#   Extension('Bio.PDB.mmCIF.MMCIFlex',
#              ['Bio/PDB/mmCIF/lex.yy.c',
#               'Bio/PDB/mmCIF/MMCIFlexmodule.c'],
#              include_dirs=["Bio"],
#              libraries=["fl"]
#              ),

Should become:

    Extension('Bio.PDB.mmCIF.MMCIFlex',
               ['Bio/PDB/mmCIF/lex.yy.c',
                'Bio/PDB/mmCIF/MMCIFlexmodule.c'],
               include_dirs=["Bio"],
               libraries=["fl"]
               ),

Please let us know if that works...

Peter



More information about the Biopython mailing list