bug fix for dihedral_hybrid.cpp

I've attached an example where lammps fails to allow hybrid dihedral styles.
To verify the problem, try:

lammps_binary -i run.in.nvt

This returns:
ERROR: Invalid dihedral style (force.cpp:406)

(This is a strange example, because I use dihedral_style hybrid with
only one sub-style (table). However most of moltemplate examples
actually need this to work robustly, and the fix is easy. See below.)

------- solution -------

The code in dihedral_hybrid.cpp appears to be from an earlier version of lammps.
To fix it, I replaced "DihedralHybrid::settings()" with the version
from angle_hybrid.cpp, and inserted
#include "ctype.h"
at line 16

run.in.nvt (1.44 KB)

system.data (2.33 KB)

table_dihedral_frustrated.dat (29.4 KB)

dihedral_hybrid.cpp (10.2 KB)

yes, good catch.

Will be in today's patch.

Thanks,
Steve

Cool. Thank you very much Steve!

Incidentally, in the future if I (or anyone else) get around to
writing an "improper_style table", then it will have the same problem.
(I'm not under the impression there is much demand for this improper
style, but I could be persuaded if somebody asks for it.)

I did make the same changes to improper_hybrid.cpp that I made to
dihedral_hybrid.cpp, and the resulting code compiles. I can post it
if you want, but I haven't tested it yet.

Cheers
Andrew