teach read_data to handle empty XXX Coeffs sections and write_data to not generate them.

This commit is contained in:
Axel Kohlmeyer
2016-06-24 18:59:58 -04:00
parent 95ec7a3c0e
commit 2d96ddcf62
2 changed files with 12 additions and 4 deletions

View File

@ -1701,6 +1701,8 @@ void ReadData::pairIJcoeffs()
void ReadData::bondcoeffs()
{
if (!nbondtypes) return;
char *next;
char *buf = new char[nbondtypes*MAXLINE];
@ -1723,6 +1725,8 @@ void ReadData::bondcoeffs()
void ReadData::anglecoeffs(int which)
{
if (!nangletypes) return;
char *next;
char *buf = new char[nangletypes*MAXLINE];
@ -1747,6 +1751,8 @@ void ReadData::anglecoeffs(int which)
void ReadData::dihedralcoeffs(int which)
{
if (!ndihedraltypes) return;
char *next;
char *buf = new char[ndihedraltypes*MAXLINE];
@ -1774,6 +1780,8 @@ void ReadData::dihedralcoeffs(int which)
void ReadData::impropercoeffs(int which)
{
if (!nimpropertypes) return;
char *next;
char *buf = new char[nimpropertypes*MAXLINE];