<div>Hi,</div><div><br></div><div>It is a typo in your input - you need to change $DDAPC_RESTRAINT to &DDAPC_RESTRAINT.<br></div><div><br></div><div>With the dollar sign CP2K thinks
$DDAPC_RESTRAINT
is a variable that you haven't assigned.</div><div><br></div><div>Matt</div><br>On Tuesday, September 25, 2012 3:50:04 PM UTC+1, Yang wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi, Dear CP2K users,<br>
<br>
I'm trying to apply a charge constraint on
an system (with ddapc charge). The program was terminated with output
"INPP_@SET: Variable $DDAPC_RESTRAINT not defined in file".<br>
<br>
I
have found several places with "restraint" keywords, and i used the
/dft/s/ddapc charge section. Below is my input, anything missing? All
comments are highly appreciated.<br>
<br>
&FORCE_EVAL<br>
METHOD Quickstep<br>
&DFT<br>
CHARGE 0<br>
LSD False<br>
&XC<br>
&XC_FUNCTIONAL pbe<br>
&END XC_FUNCTIONAL<br>
&END xc<br>
&SCF<br>
SCF_GUESS ATOMIC<br>
&END SCF<br>
&QS<br>
$DDAPC_RESTRAINT<br>
ATOMS 2<br>
Target 2<br>
type_of_density full<br>
$END DDAPC_RESTRAINT<br>
&END QS<br>
&END DFT<br>
&SUBSYS<br>
&CELL<br>
ABC 5.0 5.0 5.0<br>
PERIODIC NONE<br>
&END CELL<br>
&COORD<br>
O -2.48815585 0.00000 0.0000<br>
Mg -4.10495278 0.00000 0.0000<br>
&END COORD<br>
&kind O<br>
BASIS_SET DZVP-GTH-PADE<br>
POTENTIAL GTH-PADE-q6<br>
&end kind<br>
&kind Mg<br>
BASIS_SET DZVP-GTH-PADE<br>
POTENTIAL GTH-PADE-q10<br>
&end kind<br>
&END SUBSYS<br>
&END FORCE_EVAL<br>
&GLOBAL<br>
PROJECT MgO<br>
RUN_TYPE energy<br>
&END GLOBAL<br>
<br>
Thanks all<br>
<br>
Sincerely<br>
<br>
yang</blockquote>