Hi Daniel,

On Sat, Nov 2, 2013 at 10:11 PM, Daniel Moser <
[email protected]> wrote:

>
>
>  we've got a litte problem building/testing the brand new 2013.09 release
> on Centos 6.4.
>
>
As a starting point: I just successfully built and tested the 2013.09
release on a fresh CentOS 6.4 system without problems. A difference to what
you do below is that I used the CentOS-provided version of python, which is
2.6.6. I don't think this should make too much difference.


> The 2013.06 release builds fine and all tests succeed, except the
> following in pythonTestDirChem:
>
>
>
> 77: ======================================================================
>
> 77: ERROR: testGithubIssue54 (__main__.TestCase)
>
> 77: ----------------------------------------------------------------------
>
> 77: Traceback (most recent call last):
>
> 77:   File "UnitTestDraw.py", line 155, in testGithubIssue54
>
> 77:     img = Draw.MolToImage(mol)
>
> 77:   File "/usr/local/src/rdkit/rdkit/Chem/Draw/__init__.py", line 86, in
> MolToImage
>
> 77:     drawer.AddMol(mol,**kwargs)
>
> 77:   File "/usr/local/src/rdkit/rdkit/Chem/Draw/MolDrawing.py", line 469,
> in AddMol
>
> 77:     self._drawLabel(symbol, pos, font, color=color,orientation=orient)
>
> 77:   File "/usr/local/src/rdkit/rdkit/Chem/Draw/MolDrawing.py", line 284,
> in _drawLabel
>
> 77:     self.canvas.addCanvasText(label,(x1,y1),font,color,**kwargs)
>
> 77:   File "/usr/local/src/rdkit/rdkit/Chem/Draw/spingCanvas.py", line 83,
> in addCanvasText
>
> 77:     self.canvas.drawString(text,labelP[0],labelP[1],font,color=color)
>
> 77:   File "/usr/local/src/rdkit/rdkit/sping/PIL/pidPIL.py", line 334, in
> drawString
>
> 77:     if not pilfont: raise ValueError("bad font: %s"%font)
>
> 77: ValueError: bad font: Font(12,0,0,0,'helvetica')
>
> 77:
>
> 77: [20:56:07] INFO: Skipping agg test
>
> 77: [20:56:07] INFO: Skipping cairo test
>
> 77: [20:56:07] INFO: Skipping sping test
>
> 77: ----------------------------------------------------------------------
>
> 77: Ran 10 tests in 0.052s
>
> 77:
>
> 77: FAILED (errors=1)
>
>
>
>
>
> I'm building RDKit over ssh on a cluster server, so this could already
> explain the error. And since the task of a cluster is to calculate results
> and not to create fancy pictures, I actually don't care about this error.
>

Ok... it would be an interesting one to try and track down at some point. I
also built over ssh and didn't have this problem.


>
>
> Both releases were built with Python 2.7.5, Boost 1.54.0 and CMake 2.8.12.
>
> Boost was installed as follows:
>
>      ./bootstrap.sh --with-libraries=python,regex,iostreams
>
>      ./b2 --layout=tagged address-model=64 cflags=-fPIC cxxflags=-fPIC
> install
>
> RDKit:
>
>      export RDBASE=/usr/local/src/rdkit
>
>      export LD_LIBRARY_PATH=$RDBASE/lib:$LD_LIBRARY_PATH
>
>      export PYTHONPATH=$RDBASE:$RDBASE/lib:$PYTHONPATH
>
>      cmake .. -DRDK_BUILD_INCHI_SUPPORT=ON
> -DRDK_BUILD_COMPRESSED_SUPPLIERS=ON -L -DBOOST_ROOT=/usr/local
>
>
>
> /usr/local/lib is  added via /etc/ld.so.conf
>
>
>

This all looks fine. $RDBASE/lib doesn't need to be in PYTHONPATH, but that
*shouldn't* cause any problems.



>  The more important errors occur in fileParsersTest1 and pyGraphMolWrap
> and seem to be related to the new PDB code in 2013.09 (see output below):
>
>
>
> *fileParsersTest1  ( unnecessary lines skipped )*
>
>
>
> 30: [21:30:32] testing reading pdb files
>
> 30: [21:30:32] Explicit valence for atom # 106 O, 3, is greater than
> permitted
>
> 30: terminate called after throwing an instance of
> 'RDKit::MolSanitizeException'
>
> 30:   what():  std::exception
>
> 1/1 Test #30: fileParsersTest1 .................***Exception: Other  6.00
> sec
>
>
>
> 0% tests passed, 1 tests failed out of 1
>
>
hmmm, strange. I was originally going to suggest that the problem was one
of having RDBASE set incorrectly, but this argues strongly against that:
the 1CRN pdb file is being found. Something odd is going on while the file
is being parsed.


>  *pyGraphMolWrap   ( complete test )*
>
>
>
> (default)[build@umpalumpa build]$ ctest -R  pyGraphMolWrap -V
>
> <snip>

> 64: ............[21:29:04] Explicit valence for atom # 106 O, 3, is
> greater than permitted
>
> 64: F.....
>
> 64: ======================================================================
>
> 64: FAIL: test84PDBBasics (__main__.TestCase)
>
> 64: ----------------------------------------------------------------------
>
> 64: Traceback (most recent call last):
>
> 64:   File "/usr/local/src/rdkit/Code/GraphMol/Wrap/rough_test.py", line
> 2422, in test84PDBBasics
>
> 64:     self.failUnless(m is not None)
>
> 64: AssertionError: False is not true
>
> 64:
>

Same problem here.

Is there any chance that you have shared libraries from a previous RDKit
install floating around that are mixed up with the new build? I'm kind of
grasping at straws.


>  Am I missing a new dependency? Funnily enough, when I start up IPython
> and run the code of test84PDBBasics (w/o the unittest, e.g.
> self.failUnless.. stuff), I get no error (see below).
>
>
>
>
>
> (default)[build@umpalumpa build]$ ipython
>
> Python 2.7.5 (default, Sep 25 2013, 18:09:46)
>
> Type "copyright", "credits" or "license" for more information.
>
>
>
> IPython 1.1.0 -- An enhanced Interactive Python.
>
> ?         -> Introduction and overview of IPython's features.
>
> %quickref -> Quick reference.
>
> help      -> Python's own help system.
>
> object?   -> Details about 'object', use 'object??' for extra details.
>
>
>
> In [1]: from rdkit import RDConfig,rdBase
>
> In [2]: import os,sys,tempfile
>
> In [3]: import unittest
>
> In [4]: from rdkit import DataStructs
>
> In [5]: from rdkit import Chem
>
> In [6]: fileN =
> os.path.join(RDConfig.RDBaseDir,'Code','GraphMol','FileParsers','test_data','1CRN.pdb')
>
> In [7]: m = Chem.MolFromPDBFile(fileN)
>
> In [8]: m is not None
>
> Out[8]: True
>
> In [9]: m.GetNumAtoms()
>
> Out[9]: 327
>
> In [10]: m.GetNumBonds()
>
> Out[10]: 337
>
> In [11]: m.GetAtomWithIdx(0).GetPDBResidueInfo()
>
> Out[11]: <rdkit.Chem.rdchem.AtomPDBResidueInfo at 0x193cde0>
>
> In [12]: m.GetAtomWithIdx(0).GetPDBResidueInfo().GetName()
>
> Out[12]: ' N  '
>
> In [13]: m.GetAtomWithIdx(0).GetPDBResidueInfo().GetResidueName()
>
> Out[13]: 'THR'
>
> In [14]: m.GetAtomWithIdx(0).GetPDBResidueInfo().GetTempFactor()
>
> Out[14]: 13.79
>
> In [15]: m = Chem.MolFromPDBBlock(Chem.MolToPDBBlock(m))
>
> In [16]: m.GetNumAtoms()
>
> Out[16]: 327
>
> In [17]: m.GetNumBonds()
>
> Out[17]: 337
>
> In [18]: m.GetAtomWithIdx(0).GetPDBResidueInfo()
>
> Out[18]: <rdkit.Chem.rdchem.AtomPDBResidueInfo at 0x193cfa0>
>
> In [19]: m.GetAtomWithIdx(0).GetPDBResidueInfo().GetName()
>
> Out[19]: ' N  '
>
> In [20]: m.GetAtomWithIdx(0).GetPDBResidueInfo().GetResidueName()
>
> Out[20]: 'THR'
>
> In [21]: m.GetAtomWithIdx(0).GetPDBResidueInfo().GetTempFactor()
>
> Out[21]: 13.79
>
>
Silly question: if you use "python"
or "/opt/python_venv/default/bin/python" and enter the same commands, does
it still work?
What about if you cd into $RDBASE/Code/GraphMol/Wrap and do "python
rough_test.py"?


>  So the question is: Can I safely ignore the errors of ctest?
>

Good question. If you can run the tests by hand (as I suggest above) and
everything works, then you're probably safe.
If not... I'd be nervous.

-greg
------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to