Fix Rigid Error

I am trying to set fix rigid for a carbon nanotube but get the error:

ERROR: Illegal fix/rigid command

For this error, the manual says to check syntax, but the syntax looks fine:

fix 2 SWCNT rigid molecule temp {TEMP} {TEMP} ${TDAMP}

The first fix all NPT, so could the problem be that I need to take the SWCNT group out of the NPT fix for this to work?

Thanks,

Fred

For this error, the manual says to check syntax, but the syntax looks fine:

fix 2 SWCNT rigid molecule temp \{TEMP\} {TEMP} ${TDAMP}

The syntax is not fine. If you read carefully the doc page:

"The temp and tparam keywords apply a Nose/Hoover thermostat to the
NVT time integration performed by the rigid/nvt style. They cannot be
used with the rigid or rigid/nve styles."

The first fix all NPT, so could the problem be that I need to take the SWCNT
group out of the NPT fix for this to work?

This does not cause the error, but you should indeed take the SWCNT
group out of the NPT fix, otherwise you will be time-integrating the
atoms of this group twice.

Best,
Laurent