<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
You modify the code yourself easily.<br>
In src/gromacs/mdlib/coupling.cpp in vrescale_tcoupl() replace
trace(..ekin..) by (..ekin..[XX][XX] + ..ekin..[YY][YY]) and
multiply nrdf by 2/3 (for the V-rescale thermostat, which I would
suggest to use).<br>
Then in src/gromacs/mdlib/update.cpp you need to replace lg* by
(d==ZZ ? 1 : lg)*<br>
<br>
Cheers,<br>
<br>
Berk<br>
<br>
On 2017-02-02 14:39, Milan Predota wrote:<br>
</div>
<blockquote
cite="mid:8a16b834-a2c3-06ba-4cd7-f0fb795941ef@prf.jcu.cz"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<p>Berk,</p>
<p>thanks for a quick answer, but unfortunately the subtraction
of streaming velocity is not applicable in my case.</p>
<p>I'm working on planar solid-liquid interfaces where the liquid
flows along the surface under external electric field along the
surface.</p>
<p>The streaming velocity profile is a complex function (from zero
velocity at sticking surface to homogeneous in the bulk),
unknown in advance and very dependent on the simulation
conditions (surface charge, composition and type of ions,
applied field).</p>
<p>I'm sure more people working on similar NEMD simulations, e.g.
applying Poiseuille flow on liquid in a planar or cylindrical
slab, must face this limitation.<br>
</p>
<p>I understand to tweak thermostats is not easy since they enter
the integrator, but It is (at least in special cases) doable.</p>
<p>Simply I measure the kinetic energy only in selected
directions, correct the number of degrees of freedom and
scale/modify only selected directions, with the effect of
thermostat on the others set to zero.<br>
</p>
<p>In my own Fortran MD code and the simulations I mention, I have
checked that kinetic energy in the non-thermostated direction
(as well as rotational energy - I was working with rigid SPC/E
water) is very close to the ref_t.</p>
<p>It is a pity - otherwise Gromacs offers great support for the
simulations I'm doing (e.g. semi-isotropic pressure coupling,
external field/forces acting on selected groups, etc.).</p>
<p>I'd be happy to provide the physics if someone is able to
modify the codes.<br>
</p>
<p>Thanks,</p>
<p>Milan</p>
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 2/2/2017 2:20 PM, Berk Hess wrote:<br>
</div>
<blockquote cite="mid:b782574d-d433-4bc6-803a-b905ceac1d9a@kth.se"
type="cite">
<div class="moz-cite-prefix">Hi,<br>
<br>
It is impossible to do this correct for the general case. If
there are constraints present you can not assume the degrees
of freedom (removed) are distributed equally over the
dimensions. I have not though deeply about other issues, but I
could image there are more.<br>
It is much better to only subtract the single flow degree of
freedom, as is done for e.g. the cosine acceleration profile
that can be applied in Gromacs.<br>
<br>
Cheers,<br>
<br>
Berk<br>
<br>
On 2017-02-02 13:45, Milan Predota wrote:<br>
</div>
<blockquote
cite="mid:330c0320-cdc1-9af6-fa3d-acd3a257394e@prf.jcu.cz"
type="cite">
<p>Hi,</p>
<p>I need to do NEMD simulations of flows and for correct
thermostatting I'd need to select only 1 or 2 velocity
directions used for setting the temperature.</p>
<p>I need e.g. to calculate kinetic energy only from v_x and
v_y and avoid v_z where there is a nonzero and a priory
unknown streaming velocity.</p>
<p>The temperature coupling would act of course only on the
v_x and v_y components, leaving the v_z to equilibrate due
to intermolecular interactions.</p>
<p>I have done this in my own MD code (only water + ions) with
success, <a moz-do-not-send="true"
href="http://dx.doi.org/10.1021/acs.langmuir.6b02493">http://dx.doi.org/10.1021/acs.langmuir.6b02493</a></p>
<p>but I'm now using Gromacs for more complex molecules.</p>
<p>I don't find this feature even in Gromacs 2016. <b>Is
there a plan to incorporate this feature in Gromacs?</b></p>
<p>I guess to modify the source code by myself would be a
tedious and dangerous task.<br>
</p>
I have found out that LAMMPS probably has this feature<br>
<a moz-do-not-send="true"
href="http://lammps.sandia.gov/doc/compute_modify.html">http://lammps.sandia.gov/doc/compute_modify.html</a><br>
<a moz-do-not-send="true"
href="http://lammps.sandia.gov/doc/fix_temp_csvr.html">http://lammps.sandia.gov/doc/fix_temp_berendsen.html</a><br>
<a moz-do-not-send="true"
href="http://lammps.sandia.gov/doc/fix_temp_csvr.html">http://lammps.sandia.gov/doc/fix_temp_csvr.html</a><br>
<a moz-do-not-send="true"
href="http://lammps.sandia.gov/doc/fix_nh.html">http://lammps.sandia.gov/doc/fix_nh.html</a><br>
<br>
but I'd prefer to continue using Gromacs.<br>
Many thanks,<br>
Milan<br>
<br>
Institute of Physics and Biophysics<br>
Faculty of Science, University of South Bohemia<br>
Branisovska 1760, 370 05 Ceske Budejovice<br>
Czech Republic <br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>