48 (void)read_tpx((
char *)file.c_str(), &ir, gbox, &natoms,
nullptr,
nullptr,
51 size_t ifirstatom = 0;
53 size_t nmolblock = mtop.molblock.size();
55 for (
size_t iblock = 0; iblock < nmolblock; ++iblock) {
56 gmx_moltype_t *mol = &(mtop.moltype[mtop.molblock[iblock].type]);
58 std::string molname = *(mol->name);
62 t_atoms *atoms = &(mol->atoms);
64 for (
Index i = 0; i < atoms->nres; i++) {
68 for (
Index imol = 0; imol < mtop.molblock[iblock].nmol; ++imol) {
71 size_t natoms_mol = mtop.moltype[mtop.molblock[iblock].type].atoms.nr;
73 for (
size_t iatom = 0; iatom < natoms_mol; iatom++) {
74 t_atom *a = &(atoms->atom[iatom]);
76 std::string bead_type = *(atoms->atomtype[iatom]);
82 bead_type, a->resind + res_offset, a->m, a->q);
85 nm << bead->
getResnr() + 1 - res_offset <<
":"
92 for (
size_t iatom = 0; iatom < natoms_mol; iatom++) {
93 std::list<Bead *> excl_list;
94#if GMX_VERSION >= 20210000
95 gmx::ListOfLists<int> &excl = mol->excls;
96 for (
const Index k : excl[iatom]) {
97 excl_list.push_back(top.
getBead(k + ifirstatom));
100 t_blocka *excl = &(mol->excls);
101 for (
Index k = excl->index[iatom]; k < excl->index[iatom + 1]; k++) {
102 excl_list.push_back(top.
getBead(excl->a[k] + ifirstatom));
107 ifirstatom += natoms_mol;
112 for (
Index i = 0; i < 3; i++) {
113 for (
Index j = 0; j < 3; j++) {
114 m(i, j) = gbox[j][i];