COMBINE_COLVAR/FUNCTION too long, how to increase default_string_length?

Sun Tao taosun... at
Mon Jan 30 04:20:58 UTC 2017

Dear All:

I am trying to define a collective variable for proton transport in CP2K, 
the corresponding definition is:


where f_sw is a switch function



As the equations shown, there are many terms in the expression. Then I set 
up the system including a single file water chain with 7 water molecules (7 
oxygen atoms and 14 hydrogen atoms and 1 additional proton). I defined the 
collective variable in CP2K as the equations shown, and get a very long 
expression. When executing CP2K, it says:

 *** WARNING in input/input_val_types.F:431 :: val_get will truncate       

 *** value, value beginning with                                           

 *** 'CV8+CV9+CV10+CV11+CV12+CV13+CV14+CV15+CV16+CV17+CV18+CV19+CV20+CV21+C 

 *** 22+0-2*CV1' is too long for variable                                   

I checked the code and find that there is a variable 
"default_string_length" in the file /src/input/input_val_types.F. I guess I 
could change this variable to a larger value to include my expression 
correctly. Then how could I increase the value of "default_string_length"? 
I did not find any place that this variable is defined.

Thanks in advance !


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the CP2K-user mailing list