Hi all,

 

I’m creating protein structure from scratch (python using conda openbabel) I 
cant figure out what is the correct procedure how to set atom occupancy 
correctly. From The C++ PDB parser I extracted code the following:

 

from openbabel import OBPairFloatingPoint

def _set_ob_occupancy(occupancy, atom):

    fp = OBPairFloatingPoint()

    fp.SetAttribute('_atom_site_occupancy')

    fp.SetValue(occupancy)

    fp.SetOrigin('mmcif')

    atom.SetData(fp)

 

The problem is that when I try to run the code,   I’m getting ImportError: 
cannot import name 'OBPairFloatingPoint'. So not sure, If OBPairFloatingPoint 
is a part of different namespace or I got it wrong completely.

My setup is following:

 

Open Babel version 2.4.1
Python: 3.6.6
Conda version: 4.5.8
Mac OS: 10.13.6

 

 

Thank you for your help,

Lukas

 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to