apply clang-format
This commit is contained in:
@ -110,24 +110,22 @@ int FixMDIAimd::setmask()
|
||||
void FixMDIAimd::init()
|
||||
{
|
||||
if (mdicomm != MDI_COMM_NULL) return;
|
||||
|
||||
|
||||
// one-time auto-detect whether engine is stand-alone code or plugin library
|
||||
// also initializes mdicomm
|
||||
// plugin = 0/1 for engine = stand-alone code vs plugin library
|
||||
|
||||
MDI_Get_communicator(&mdicomm,0);
|
||||
MDI_Get_communicator(&mdicomm, 0);
|
||||
|
||||
if (mdicomm == MDI_COMM_NULL) {
|
||||
if (mdicomm == MDI_COMM_NULL) {
|
||||
plugin = 0;
|
||||
MDI_Accept_communicator(&mdicomm);
|
||||
if (mdicomm == MDI_COMM_NULL)
|
||||
error->all(FLERR,"MDI unable to connect to stand-alone engine");
|
||||
if (mdicomm == MDI_COMM_NULL) error->all(FLERR, "MDI unable to connect to stand-alone engine");
|
||||
} else {
|
||||
plugin = 1;
|
||||
int method;
|
||||
MDI_Get_method(&method,mdicomm);
|
||||
if (method != MDI_PLUGIN)
|
||||
error->all(FLERR,"MDI internal error for plugin engine");
|
||||
MDI_Get_method(&method, mdicomm);
|
||||
if (method != MDI_PLUGIN) error->all(FLERR, "MDI internal error for plugin engine");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -601,7 +601,8 @@ void MDIEngine::mdi_md()
|
||||
// delete the instance before this method returns
|
||||
|
||||
modify->add_fix("MDI_ENGINE_INTERNAL all MDI/ENGINE");
|
||||
FixMDIEngine *mdi_fix = dynamic_cast<FixMDIEngine *>( modify->get_fix_by_id("MDI_ENGINE_INTERNAL"));
|
||||
FixMDIEngine *mdi_fix =
|
||||
dynamic_cast<FixMDIEngine *>(modify->get_fix_by_id("MDI_ENGINE_INTERNAL"));
|
||||
mdi_fix->mdi_engine = this;
|
||||
|
||||
// initialize LAMMPS and setup() the simulation
|
||||
@ -723,7 +724,8 @@ void MDIEngine::mdi_optg()
|
||||
// delete the instance before this method returns
|
||||
|
||||
modify->add_fix("MDI_ENGINE_INTERNAL all MDI/ENGINE");
|
||||
FixMDIEngine *mdi_fix = dynamic_cast<FixMDIEngine *>( modify->get_fix_by_id("MDI_ENGINE_INTERNAL"));
|
||||
FixMDIEngine *mdi_fix =
|
||||
dynamic_cast<FixMDIEngine *>(modify->get_fix_by_id("MDI_ENGINE_INTERNAL"));
|
||||
mdi_fix->mdi_engine = this;
|
||||
|
||||
// initialize LAMMPS and setup() the simulation
|
||||
@ -956,7 +958,8 @@ void MDIEngine::create_system()
|
||||
// optionally set charges if specified by ">CHARGES"
|
||||
|
||||
if (flag_velocities)
|
||||
lammps_create_atoms(lmp, sys_natoms, nullptr, sys_types, sys_coords, sys_velocities, nullptr, 1);
|
||||
lammps_create_atoms(lmp, sys_natoms, nullptr, sys_types, sys_coords, sys_velocities, nullptr,
|
||||
1);
|
||||
else
|
||||
lammps_create_atoms(lmp, sys_natoms, nullptr, sys_types, sys_coords, nullptr, nullptr, 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user