‘style’ was not declared in this scope

Hi lammps users,

I am trying to write new feature based on delete_atoms that will delete certain atoms and absorb their moisture value.

When I compile the code, I encountered the error ‘"style’ was not declared in this scope" on the line where I am trying to find the newly added fix atomic property called MCvalue.

This line:� fix_MCvalue = static_cast<FixPropertyAtom*>(modify->find_fix_property(“MCvalue”,“property/atom”,“scalar”,0,0,style));

My guess is that I can not use fixes inside command style classes?

Please clarify my confusion and suggest a way to solve this.

Many thanks,

Sheng-En Lin�

You probably did not include style.h.


There is no find_fix_property() method in modify.cpp.