If the failed assertion comes from chemfiles, that's a bug on our side! What is the selection you are using? It sounds like you are checking a residue property/residue name.
so my hunch is there's some limit somewhere?
The limit should be max size_t
, i.e. 4294967295 for 32-bit systems & 18446744073709551615 on 64-bits
dnf downgrade chemfiles-0.9.3
and potentially the same for chemfiles-devel
.
dnf info chemfiles
Last metadata expiration check: 1 day, 1:07:05 ago on Mon 23 Nov 2020 11:31:44 AM EST.
Available Packages
Name : chemfiles
Version : 0.10.0
Release : 3.1
Architecture : aarch64
Size : 1.1 M
Source : chemfiles-0.10.0-3.1.src.rpm
Repository : home_Luthaf
Summary : Modern library for chemistry file reading and writing
URL : http://chemfiles.com/
License : BSD
Description :
Name : chemfiles
Version : 0.10.0
Release : 3.1
Architecture : src
Size : 4.5 M
Source : None
Repository : home_Luthaf
Summary : Modern library for chemistry file reading and writing
URL : http://chemfiles.com/
License : BSD
Description :
Name : chemfiles
Version : 0.10.0
Release : 3.1
Architecture : x86_64
Size : 1.3 M
Source : chemfiles-0.10.0-3.1.src.rpm
Repository : home_Luthaf
Summary : Modern library for chemistry file reading and writing
URL : http://chemfiles.com/
License : BSD
Description :
Name : chemfiles
Version : 0.9.3
Release : 7.11
Architecture : ppc64le
Size : 1.2 M
Source : chemfiles-0.9.3-7.11.src.rpm
Repository : home_Luthaf
Summary : Modern library for chemistry file reading and writing
URL : http://chemfiles.com/
License : BSD
Description :
chemfiles::Trajectory trj("testfile.dcd");
auto testframe=trj.read();
cout << "Distance between oxygen " << 1 << " and " << 5 << "is" << testframe.distance(1,5) << "\n";
auto position = testframe.positions();
auto diff = position[5] - position[1];
cout << "Distance from positions" << diff.norm() << "\n";
I am getting vastly different values from both methods. If I use the distance() method then I get 0.18 Angstroms, but from vector subtraction, I get 9.56 Angstroms (which matches the one I get from VMD).
The coordinates returned by Frame.positions() are in Angstroms, is that correct?
yes, that's the idea. We need to improve the doc on this front.
I am getting vastly different values from both methods. If I use the distance() method then I get 0.18 Angstroms, but from vector subtraction, I get 9.56 Angstroms (which matches the one I get from VMD).
Frame::distance
uses periodic boundary condition, and you can check the distances being used by looking at frame.cell().lengths()
and frame.cell().angles()
. If you want to remove all periodic boundary conditions, you need to use an infinite cell, which you can set with frame.set_cell(UnitCell())