Support for the copy module interface (__copy__ and __deepcopy__) for objects that inherit from OEBase. This makes OEChem molecules behave a little more pythonic allowing the user to care a little less that they are C++ based objects.
OESmartsLexReplace is now properly wrapped for python.
Added OEChem::OEAtomArray and OEChem::OEBondArray classes (similar to OEChem::OEFloatArray) for dealing with arrays of atom and bond pointers from python.
Fixed an inconsistency of using OEIter.Target. Prior to 1.7.1 if Target was used inside a python iteration the Target would point to the next item in the iterator, not the current one. Therefore, the following assertion always holds:
atomiter = mol.GetAtoms() for atom in atomiter: assert atom == atomiter.Target()
Since the fix was implemented as a reimplementation of the OEIter.__iter__ method to make it return a python generator instead of the iterator object itself there is now a slight difference in the above code snippet and the alternative way of using the OEIter.next python iteration protocol as shown in the following code:atomiter = mol.GetAtoms() try: while True: atom = atomiter.next() assert atom != atomiter.Target() except StopIteration: pass
This previous code snippet will behave the same in 1.7.0 and 1.7.1. However, note that now OEIter.Target returns the next item in the iterator. This is fundamentally how OEIter.next is required to work.
We could have not provided OEIter.next at all since the only requirement for python iteration is the __iter__ method. However, we choose to leave a OEIter.next implementation in order to not break code that was written like the following:
atomiter = mol.GetAtoms() atom = atomiter.next() # grab the first atom
oefpos_t now works for files greater than 4GB on 64-bit windows.
Fixed an infinite loop that would occur from the following code:
oeosstream sfs; sfs.open("foobar"); sfs.write("blah");
The crystal symmetry routines were broken in the 1.7.0 release by a corrupted matrix.
When reading symmetry from external sources (i.e. PDB files or maps) a warning is thrown when reading out of date space groups rather than fail to read symmetry.
Setting space groups will fail unless the most current space group constraints are used.
Added the following space group aliases for older style space groups.
I 1 2 1 -> C 1 2 1 P 1- -> P -1