Calculating Pressure - Intro

Hi Raphael,

There is a typo in your script.

You define a compute "PresAll" with only ONE "S" and then you equalize
the variable "Pres1" to "c_PressAll" with TWO "S".

I have the feeling this is really not the kind of "problem" that
should be sent to this list. It is a simple typo which you could have
found by yourself or by talking to one of your colleagues. Notice that
the log message tells you exactly where the problem is, and also what
kind of problem it is. It is almost like magic!

Cheers,
  -felipe.

Hi all,

I’d like to thank Felipe and Steve for the advises.

I’ve changed my input. But only Steve’s hint solved partially the problems.

I still have some questions:

  1. The calculated pressure is negative (-181 bar). How can i solve it?

  2. Why i can’t use “p1” instead of “p” as the ID of pressure evaluation. The error message is: “Substitution for illegal variable”.

Here is my input:

fix 1 all nvt temp 94.4 94.4 0.1
minimize 1.0e-10 1.0e-12 1000 10000

thermo 0
run 100

variable p equal press
print “Global Pressure = $p bar”

Hi all,
I'd like to thank Felipe and Steve for the advises.
I've changed my input. But only Steve's hint solved partially the problems.
I still have some questions:
1) The calculated pressure is negative (-181 bar). How can i solve it?

why should it not be like that? what is there to solve?

2) Why i can't use "p1" instead of "p" as the ID of pressure evaluation. The
error message is: "Substitution for illegal variable".

read the documentation on variables!
multi-character variable names need
to be expanded ${name} and _not_ $name.

please consider that if you make it a habit of
reading and double checking the documentation
first, people will be much more likely to be
responsive to questions, where you didn't find
a solution as easily.

axel.