Menu

Commit [r26381]  Maximize  Restore  History

The structure.write_pdb user function can now handle empty molecules.

This fixes bug #22861 (https://gna.org/bugs/?22861), the chain IDs in the structure.write_pdb user
function PDB files are incorrect after calling structure.delete.

To handle this consistently, the internal structural object ModelContainer.mol_loop() generator
method has been created. This loops over the molecules, yielding those that are not empty. The
MolContainer.is_empty() method has been fixed by not checking for the molecule name, as that remains
after the structure.delete user function call while all other information has been removed. And
finally the write_pdb() structural object method has been modified to use the mol_loop() method
rather than performing the loop itself.

bugman 2014-10-23

changed /trunk/lib/structure/internal/models.py
changed /trunk/lib/structure/internal/molecules.py
changed /trunk/lib/structure/internal/object.py
/trunk/lib/structure/internal/models.py Diff Switch to side-by-side view
Loading...
/trunk/lib/structure/internal/molecules.py Diff Switch to side-by-side view
Loading...
/trunk/lib/structure/internal/object.py Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.