Skip to content

Commit

Permalink
Use correct object
Browse files Browse the repository at this point in the history
  • Loading branch information
pslacerda committed Aug 7, 2024
1 parent 58b5709 commit e6025de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion layer3/MoleculeExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ struct MoleculeExporterChemPy : public MoleculeExporter {
void writeAtom() override {
PyObject *atom = CoordSetAtomToChemPyAtom(G,
m_iter.getAtomInfo(), m_last_obj, m_coord, getRefPtr(),
m_iter.getAtm(), m_mat_full.ptr);
m_iter.getAtm(), m_iter.obj);

if (atom) {
PyList_Append(m_atom_list, atom);
Expand Down
3 changes: 3 additions & 0 deletions testing/tests/api/exporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,11 @@ def testGetModelObjectName(self):
cmd.load(self.datafile('1rna.cif'))

m1 = cmd.get_model()
cnt = cmd.count_atoms('%1oky-frag')

self.assertEqual(m1.atom[0].model, '1oky-frag')
self.assertEqual(m1.atom[-1].model, '1rna')
self.assertEqual(m1.atom[cnt].model, '1rna')


@testing.requires_version('2.1')
Expand Down

0 comments on commit e6025de

Please sign in to comment.