add a bond_write command to write out a table for bond_style table

This commit is contained in:
Axel Kohlmeyer
2016-03-25 18:08:28 -04:00
parent d436d96be3
commit b096069daf
4 changed files with 77 additions and 0 deletions

View File

@ -644,6 +644,7 @@ int Input::execute_command()
else if (!strcmp(command,"atom_style")) atom_style();
else if (!strcmp(command,"bond_coeff")) bond_coeff();
else if (!strcmp(command,"bond_style")) bond_style();
else if (!strcmp(command,"bond_write")) bond_write();
else if (!strcmp(command,"boundary")) boundary();
else if (!strcmp(command,"box")) box();
else if (!strcmp(command,"comm_modify")) comm_modify();
@ -1281,6 +1282,17 @@ void Input::bond_style()
/* ---------------------------------------------------------------------- */
void Input::bond_write()
{
if (atom->avec->bonds_allow == 0)
error->all(FLERR,"Bond_write command when no bonds allowed");
if (force->bond == NULL)
error->all(FLERR,"Bond_write command before bond_style is defined");
else force->bond->write_file(narg,arg);
}
/* ---------------------------------------------------------------------- */
void Input::boundary()
{
if (domain->box_exist)