## cal

### Syntax

```
cal group_name cal_variable
```

`group_name`

= a string (length <= 30)`cal_variable`

=*energy*or*force*or*stress*

### Examples

```
cal green_cone force
cal small_sphere stress
```

### Description

This commands calculates certain quantities associated with new groups and/or restart groups. The `group_name`

must match that of one of these groups.

*energy* is the total potential energy in a group divided by the total number of nodes and atoms in the group. It is a scalar.

*force* and *stress* are the total force and stress in a group, respectively. *force* is a $3\times 1$ vector while *stress* is a $3\times 3$ tensor.

Results of this command are written to `group_cal_#`

with a frequency of `reduce_freq`

, where `#`

is the ID of calculation. For *stress*, a $3\times 3$ strain tensor of the simulation box is appended right after the stress tensor.

### Related commands

There cannot be fewer `cal`

commands than `cal_number`

, which should not be larger than `new_group_number`

+ `restart_group_number`

. When there are more `cal`

commands in `cac.in`

than `cal_number`

, those appearing later will be ignored.

### Related files

`calculation.f90`

and `group_cal.f90`

### Default

None.