Dear everyone

I want to calculate the PE of a certain region in the model, and then output it to txt. I first select the region, then define the group, then use compute to calculate PE, then use compute reduce sum to calculate the sum, and then use fix to output to a txt file. However, it keeps reporting errors. I don’t know how to modify it.

Below is my program.

```
----------------------------------------------------------
region energyt1 block 0 INF 0 INF 0 17 units box
group energyt1 region energyt1
compute ene1 energyt1 pe/atom pair kspace
compute 1 energyt1 reduce sum c_ene1[*]
fix ened1 energyt1 ave/time 1000 1 1000 c_1[1] file ene1.txt
----------------------------------------------------------
```

Could give me some help?

Thank you very much.

Yours

YAFEI LI