Unverified Commit 286112ff authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

count each force computation as one simulation step. this avoids accessing uninitialized data, too.

parent 4b8621e7
Loading
Loading
Loading
Loading
+0 −48
Original line number Diff line number Diff line
# dynamical_matrix command

## Syntax

```
dynamical_matrix group-ID style args keyword value ...
```

* group-ID = ID of group of atoms to displace
* style = *regular* or *eskm*
```
*regular* args = gamma
  gamma = finite difference displacement length
*eskm* args = gamma
  gamma = finite difference displacement length
```
* zero or more keyword/value pairs may be appended
* keyword = *file* or *binary*
```
*file* value = output_file
  output_file = name of file to dump the dynamical matrix into
*binary* values = *yes* or *no* or *gzip*
```

## Examples

```
dynamical_matrix 1 regular 0.000001
dynamical_matrix 1 eskm 0.000001
dynamical_matrix 3 regular 0.00004 file dynmat.dat
dynamical_matrix 5 eskm 0.00000001 file dynamical.dat binary yes
```

## Description

Calculate the dynamical matrix of the selected group.

## Restrictions

None

## Related commands

None

## Default

The option defaults are file = "dynmat.dyn", binary = no  
+3 −1
Original line number Diff line number Diff line
@@ -258,6 +258,7 @@ void DynamicalMatrix::calculateMatrix()

    if (comm->me == 0 && screen) fprintf(screen,"Calculating Dynamical Matrix...\n");

    update->nsteps = 0;
    for (bigint i=1; i<=natoms; i++){
        local_idx = atom->map(i);
        for (bigint alpha=0; alpha<3; alpha++){
@@ -390,6 +391,7 @@ void DynamicalMatrix::update_force()
        comm->reverse_comm();
        timer->stamp(Timer::COMM);
    }
    ++ update->nsteps;
}

/* ----------------------------------------------------------------------
+3 −1
Original line number Diff line number Diff line
@@ -247,6 +247,7 @@ void ThirdOrder::calculateMatrix()

    if (comm->me == 0 && screen) fprintf(screen,"Calculating Anharmonic Dynamical Matrix...\n");

    update->nsteps = 0;
    for (bigint i=1; i<=natoms; i++){
        local_idx = atom->map(i);
        for (bigint alpha=0; alpha<3; alpha++){
@@ -411,6 +412,7 @@ void ThirdOrder::update_force()
        comm->reverse_comm();
        timer->stamp(Timer::COMM);
    }
    ++ update->nsteps;
}

/* ----------------------------------------------------------------------