Top Page > Browsing
MD.TempControl question
Date: 2023/09/23 05:11
Name: Pavel Ondracka   <pavel.ondracka@email.cz>

Dear developers,

I'm a bit confused about some nuances of the MD.TempControl for NH thermostat.

Specifically why is there a difference between
<MD.TempControl
  3
  1 300.0
  1000 300.0
  5000 1500.0
MD.TempControl>
and
<MD.TempControl
  2
  1000 300.0
  5000 1500.0
MD.TempControl>?

The md file shows that the Given temperature for the first 1000 steps would be 300.0 in both cases, but from the third step the actual temperatures start to diverge.

I assume the first one is correct since this reflects what the manual says. I just want to understand the difference. I used velocity scaling previously so that is why I erroneously used the second notation which is closer to how its supposed to be for VS (minus the extra columns), but now I have some quite time consuming calculation using the second syntax which I'm reluctant to redo, before understanding if it is completely wrong or what has actually happened. The intention was obviously to have constant temperature in the first 1000 steps but do I actually have NVE or what happened?

Best regards
Pavel
メンテ
Page: [1]

Re: MD.TempControl question ( No.1 )
Date: 2023/10/27 12:03
Name: T. Ozaki

Hi,

Sorry for my late response.
As explained in the manual, the first one is the correct specification.

As you can confirm in MD_pac.c as

  /* find a given temperature by a linear interpolation */

  NH_switch = 0;
  i = 1;
  do {

    if ( TempPara[i][1]<=iter && iter<TempPara[i+1][1] ){

      GivenTemp = TempPara[i][2] + (TempPara[i+1][2] - TempPara[i][2])*
            ((double)iter-(double)TempPara[i][1])/((double)TempPara[i+1][1]-(double)TempPara[i][1]);

      NH_switch = 1;
    }

    i++;
  } while (NH_switch==0 && i<=(TempNum-1));

The given temperature is controlled with the data given by the first format.
We do not guarantee the behavior of the second case.

The difference of the format between VS and NH is just a historical reason in the development.

Regards,

TO
メンテ

Page: [1]

Thread Title (must) Move the thread to the top
Your Name (must)
E-Mail (must)
URL
Password (used in modification of the submitted text)
Comment (must)

   Save Cookie