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 gmx::ListOfLists<int> &excl = mol->excls;
95 for (
const Index k : excl[iatom]) {
96 excl_list.push_back(top.
getBead(k + ifirstatom));
100 ifirstatom += natoms_mol;
105 for (
Index i = 0; i < 3; i++) {
106 for (
Index j = 0; j < 3; j++) {
107 m(i, j) = gbox[j][i];