<div dir="ltr">I found that in the section XYZ_DIAG, there is a key word ABSOLUTE_POSITION, saying <em style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;">If enabled, the absolute position of the atoms will be used. </em><div>I think this will be the right option to me. Thanks very much for your reminding!</div><div><br>在 2017年1月20日星期五 UTC-6上午11:02:31,Marcella Iannuzzi写道:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi, <div><br></div><div>yes, this would be an option. </div><div>Other possibilities are the DISTANCE_POINT_PLANE variable, or the displacement variable, called XYZ_DIAG</div><div>regards</div><div>Marcella</div><div><br></div><div><br></div><div><br>On Friday, January 20, 2017 at 4:56:09 PM UTC+1, Sun Tao wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi Marcella:</div><div><br></div>Thanks for your response! Another question is how could I define a collective variable as the z-coordinate of a specific atom? In the COLVAR session I only found DISTANCE which defines the distance between 2 specific atoms and COORDINATION which defines the coordination number of a specific atom. I did not find anything like COORDINATES. Shall I fix the position of some atoms and use DISTANCE to define the z-coordinate? <div><br></div><div>Thanks ~</div><div><br></div><div>Tao<br><div><br></div><div><br><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear Tao,<div><br></div><div>yes this is the right way, but please keep the same name of the variable in the expression of the FUNCTION as the one you assign with the keyword VARIABLES </div><div><br></div><div>regards</div><div>Marcella</div><div><br><br>On Friday, January 20, 2017 at 5:19:28 AM UTC+1, Sun Tao wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear All:<div><br></div><div>I am trying to set up some collective variables in cp2k. I need to calculate the exponential-form value of a defined collective variable, which is the distance between certain 2 atoms, the form is as the following:</div><div><br></div><div>f = 1/{1 + exp([distance(i, j) - 0.5]/1.5)}</div><div><br></div><div>Shall I define the CV as the following?</div><div><br></div><div><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)">  &SUBSYS
    &COLVAR
       &COMBINE_COLVAR
          &COLVAR
             &DISTANCE
                ATOMS 1 5</pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)">             &END
          &END COLVAR
          FUNCTION 1/(1+exp((CV-0.5)/1.5))
          VARIABLES CV1 
          ERROR_LIMIT 1.0E-8
       &END
    &END</pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)">   &END</pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)"><br></pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)"><br></pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)">Or the correct form should be something else? Thanks ~</pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)"><br></pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)">Tao</pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)"><br></pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)"><br></pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)"><br></pre><pre style="padding:0.7em 1em;font-family:Consolas,"Andale Mono WT","Andale Mono","Bitstream Vera Sans Mono","Nimbus Mono L",Monaco,"Courier New",monospace;font-size:14px;direction:ltr;background-color:rgb(251,250,249);color:rgb(51,51,51);border-radius:2px;overflow:auto;word-wrap:normal;border-width:1px;border-style:solid;border-color:rgb(204,204,204)"><br></pre></div></div></blockquote></div></div></blockquote></div></div></div></blockquote></div></div></blockquote></div></div>