Improper Coeffs not written to data file with improper_style umbrella

Dear All,

I’ve noticed that with “improper_style umbrella” the “Improper Coeffs” section does not get written to the data file when using write_data. On the other hand, this works as expected when using “improper_style harmonic”. I’ve found that there’s a “writedata = 1;” line in the ImproperHarmonic initializer, while the ImproperUmbrella one in improper_umbrella.cpp is empty and think this is the cause. I’m using 16Feb16 version, but this should also be valid for the latest version in the repository. I’ve also attached sample input and data files to demonstrate this.

Best Regards,

data.init (212 Bytes)

in.lmp (148 Bytes)

Dear All,

I've noticed that with "improper_style umbrella" the "Improper Coeffs"
section does not get written to the data file when using write_data. On the
other hand, this works as expected when using "improper_style harmonic".
I've found that there's a "writedata = 1;" line in the ImproperHarmonic
initializer, while the ImproperUmbrella one in improper_umbrella.cpp is
empty and think this is the cause. I'm using 16Feb16 version, but this
should also be valid for the latest version in the repository. I've also
attached sample input and data files to demonstrate this.

​it is not the flag itself that is missing, but the implementation of the
corresponding functions in the (contributed) improper style.
the documentation of the write_data command clearly states, that the
implementation is not complete, as it requires not only the write data
command itself, but matching functionality in *all* force field styles.
setting writedata=1 in the contstructor is merely the indication, that for
a given force field style, the required functionality has been implemented.
so, if you want the output, you have to do more programming than just
setting the flag to 1.

axel.​

Dear Alex,

thank you for the information.I assumed it was implemented because there already was a write_data function
and it seemed to work with my data files when writedata=1 was set.

Is there an easy way to know what needs to be implemented specifically?

Best Regards,

Dear Alex,

thank you for the information.
I assumed it was implemented because there already was a write_data
function
and it seemed to work with my data files when writedata=1 was set.

​hmmm... that is unusual. that means the person contributing the code added
this feature, but didn't really understand how to do it and thus overlooked
the flag in the constructor. i will take a closer look.

axel.​

Dear Alex,

thank you for the information.
I assumed it was implemented because there already was a write_data
function
and it seemed to work with my data files when writedata=1 was set.

hmmm... that is unusual. that means the person contributing the code added
this feature, but didn't really understand how to do it and thus overlooked
the flag in the constructor. i will take a closer look.

ok. you are right. adding the flag to the constructor completes the
functionality.
i'm committing it to my development branch and will forward it to
steve when he's back and has time to integrated patches again.

axel.