* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2011,2014,2015,2017,2018 by the GROMACS development team.
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
std::vector<int> atoms = { ai, aj };
std::vector<real> forceParm(c.begin(), c.end());
- ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm, s ? s : ""));
+ ps->interactionTypes.emplace_back(atoms, forceParm, s ? s : "");
}
void add_cmap_param(InteractionsOfType* ps, int ai, int aj, int ak, int al, int am, const char* s)
{
std::vector<int> atoms = { ai, aj, ak, al, am };
- ps->interactionTypes.emplace_back(InteractionOfType(atoms, {}, s ? s : ""));
+ ps->interactionTypes.emplace_back(atoms, gmx::ArrayRef<const real>{}, s ? s : "");
}
void add_vsite2_param(InteractionsOfType* ps, int ai, int aj, int ak, real c0)
{
std::vector<int> atoms = { ai, aj, ak };
std::vector<real> forceParm = { c0 };
- ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm));
+ ps->interactionTypes.emplace_back(atoms, forceParm);
}
void add_vsite3_param(InteractionsOfType* ps, int ai, int aj, int ak, int al, real c0, real c1)
{
std::vector<int> atoms = { ai, aj, ak, al };
std::vector<real> forceParm = { c0, c1 };
- ps->interactionTypes.emplace_back(InteractionOfType(atoms, forceParm));
+ ps->interactionTypes.emplace_back(atoms, forceParm);
}
void add_vsite3_atoms(InteractionsOfType* ps, int ai, int aj, int ak, int al, bool bSwapParity)
{
std::vector<int> atoms = { ai, aj, ak, al };
- ps->interactionTypes.emplace_back(InteractionOfType(atoms, {}));
+ ps->interactionTypes.emplace_back(atoms, gmx::ArrayRef<const real>{});
if (bSwapParity)
{
void add_vsite4_atoms(InteractionsOfType* ps, int ai, int aj, int ak, int al, int am)
{
std::vector<int> atoms = { ai, aj, ak, al, am };
- ps->interactionTypes.emplace_back(InteractionOfType(atoms, {}));
+ ps->interactionTypes.emplace_back(atoms, gmx::ArrayRef<const real>{});
}
int search_jtype(const PreprocessResidue& localPpResidue, const char* name, bool bNterm)
int i = 0;
for (const auto& dihedral : dih)
{
- newDihedrals.emplace_back(std::pair<InteractionOfType, int>(dihedral, i++));
+ newDihedrals.emplace_back(dihedral, i++);
}
}
else
if (was_dihedral_set_in_rtp(*dihedral) || dihedral == dih.begin()
|| !is_dihedral_on_same_bond(*dihedral, *(dihedral - 1)))
{
- newDihedrals.emplace_back(std::pair<InteractionOfType, int>(*dihedral, i++));
+ newDihedrals.emplace_back(*dihedral, i++);
}
}
}
if (!bStop)
{
/* Not broken out */
- improper.emplace_back(InteractionOfType(ai, {}, bondeds.s));
+ improper.emplace_back(ai, gmx::ArrayRef<const real>{}, bondeds.s);
}
}
while ((start < atoms->nr) && (atoms->atom[start].resind == i))
/* Copy normal and FEP parameters and multiply by fudge factor */
gmx::ArrayRef<const real> existingParam = type.forceParam();
GMX_RELEASE_ASSERT(2 * nrfp <= MAXFORCEPARAM,
- "Can't have more parameters than half of maximum p arameter number");
+ "Can't have more parameters than half of maximum parameter number");
for (int j = 0; j < nrfp; j++)
{
/* If we are using sigma/epsilon values, only the epsilon values
forceParam[j] = scaling * existingParam[j];
forceParam[nrfp + j] = scaling * existingParam[j];
}
- pairs->interactionTypes.emplace_back(InteractionOfType(atomNumbers, forceParam));
+ pairs->interactionTypes.emplace_back(atomNumbers, forceParam);
i++;
}
}
c = std::sqrt(ci * cj);
forceParam[nf] = c;
}
- interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
+ interactions->interactionTypes.emplace_back(gmx::ArrayRef<const int>{},
+ forceParam);
}
}
break;
forceParam[0] *= -1;
}
forceParam[1] = std::sqrt(ci1 * cj1);
- interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
+ interactions->interactionTypes.emplace_back(gmx::ArrayRef<const int>{},
+ forceParam);
}
}
forceParam[0] *= -1;
}
forceParam[1] = std::sqrt(ci1 * cj1);
- interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
+ interactions->interactionTypes.emplace_back(gmx::ArrayRef<const int>{},
+ forceParam);
}
}
forceParam[1] = 2.0 / (1 / bi + 1 / bj);
}
forceParam[2] = std::sqrt(ci2 * cj2);
- interactions->interactionTypes.emplace_back(InteractionOfType({}, forceParam));
+ interactions->interactionTypes.emplace_back(gmx::ArrayRef<const int>{}, forceParam);
}
}
if (addBondType)
{
/* fill the arrays up and down */
- bt->interactionTypes.emplace_back(
- InteractionOfType(b.atoms(), b.forceParam(), b.interactionTypeName()));
+ bt->interactionTypes.emplace_back(b.atoms(), b.forceParam(), b.interactionTypeName());
/* need to store force values because they might change below */
std::vector<real> forceParam(b.forceParam().begin(), b.forceParam().end());
{
atoms.emplace_back(*oldAtom);
}
- bt->interactionTypes.emplace_back(InteractionOfType(atoms, forceParam, b.interactionTypeName()));
+ bt->interactionTypes.emplace_back(atoms, forceParam, b.interactionTypeName());
}
}
std::vector<real> forceParam = {
fudgeQQ, atoms->atom[param.ai()].q, atoms->atom[param.aj()].q, param.c0(), param.c1()
};
- paramnew.emplace_back(InteractionOfType(param.atoms(), forceParam, ""));
+ paramnew.emplace_back(param.atoms(), forceParam, "");
}
/* now assign the new data to the F_LJC14_Q structure */
static void enter_bonded(int nratoms, std::vector<VsiteBondedInteraction>* bondeds, const InteractionOfType& type)
{
GMX_RELEASE_ASSERT(nratoms == type.atoms().ssize(), "Size of atom array must match");
- bondeds->emplace_back(VsiteBondedInteraction(type.atoms(), type.c0()));
+ bondeds->emplace_back(type.atoms(), type.c0());
}
/*! \internal \brief
{
for (auto temperatureGroup = 0; temperatureGroup < numTemperatureGroups; ++temperatureGroup)
{
- noseHooverGroups_.emplace_back(NoseHooverGroup(chainLength,
- referenceTemperature[temperatureGroup],
- numDegreesOfFreedom[temperatureGroup],
- couplingTime[temperatureGroup],
- couplingTimeStep,
- nhcUsage));
+ noseHooverGroups_.emplace_back(chainLength,
+ referenceTemperature[temperatureGroup],
+ numDegreesOfFreedom[temperatureGroup],
+ couplingTime[temperatureGroup],
+ couplingTimeStep,
+ nhcUsage);
}
}
else if (nhcUsage == NhcUsage::Barostat)
"There can only be one barostat for the system");
// Barostat has a single degree of freedom
const int degreesOfFreedom = 1;
- noseHooverGroups_.emplace_back(NoseHooverGroup(
- chainLength, referenceTemperature[0], degreesOfFreedom, couplingTime[0], couplingTimeStep, nhcUsage));
+ noseHooverGroups_.emplace_back(
+ chainLength, referenceTemperature[0], degreesOfFreedom, couplingTime[0], couplingTimeStep, nhcUsage);
}
}
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
std::vector<Range<int>> atomRanges;
if (comShiftType == COMShiftType::Molecule)
{
- atomRanges.emplace_back(gmx::Range<int>(0, atomsPerMolecule));
+ atomRanges.emplace_back(0, atomsPerMolecule);
}
else if (comShiftType == COMShiftType::Residue)
{
std::vector<t_tabledata> td;
for (k = 0; (k < ntab); k++)
{
- td.emplace_back(t_tabledata(numRows, nx0, tabscale, true));
+ td.emplace_back(numRows, nx0, tabscale, true);
for (i = 0; (i < numRows); i++)
{
td[k].x[i] = yy[0][i];