Hi Chris,
I think I managed to fix the buggy matrix operations, although not in a safe manner. I will upload the code in a while.
I have hit another issue...It seems like the order in which I pull molecules out of a molecules container has changed ?
Before I used to be able to write:
molecules = system[MGName("all")].molecules()
molnums = molecules.molNums()
water_results = {}
for x in range(0,len(molnums)):
molnum = molnums[x]
and the molecules in molnums were sorted by molecule number i.e
(Pdb) molnums
[MolNum(1), MolNum(2), MolNum(3), MolNum(4), MolNum(5), MolNum(6), MolNum(7), MolNum(8), MolNum(9), MolNum(10), MolNum(11), MolNum(12), MolNum(13), MolNum(14), MolNum(15), MolNum(16), MolNum(17), MolNum(18), MolNum(19), MolNum(20), MolNum(21), MolNum(22), MolNum(23), MolNum(24), MolNum(25), MolNum(26), MolNum(27), MolNum(28), ..... ]
Now with the new code it looks like the molecules are randomly ordered
(Pdb) molnums
[MolNum(240), MolNum(241), MolNum(254), MolNum(255), MolNum(252), MolNum(253), MolNum(250), MolNum(251), MolNum(248), MolNum(249), MolNum(262), MolNum(263), MolNum(260), MolNum(261), MolNum(258), MolNum(259), MolNum(256), MolNum(257), MolNum(270), MolNum(271), MolNum(268), MolNum(269), MolNum(266), MolNum(267), MolNum(264), MolNum(265), MolNum(278),....)
This unfortunately breaks many of the scripts I wrote (I suspect this also explains why the DCD writer code is no longer working properly as the order of the molecules is no longer in sync with the order in which their coordinates were loaded).
using
molnums.sort()
gives me back the desired behaviour.
For what reason is the code behaving like this now? I'm not clear on whether this is a python3 or Sire change.
Is it safe to use .sort() throughout my scripts to reorder molecules?
Best wishes,
Julien
(Sorry for all the questions)
--
You received this message because you are subscribed to the Google Groups "Sire Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sire-develope...@googlegroups.com.
To post to this group, send email to sire-de...@googlegroups.com.
Visit this group at http://groups.google.com/group/sire-developers.
For more options, visit https://groups.google.com/d/optout.