diff --git a/src/USER-REAXC/fix_qeq_reax.cpp b/src/USER-REAXC/fix_qeq_reax.cpp index 794c23da3a..bb0fe3e6d7 100644 --- a/src/USER-REAXC/fix_qeq_reax.cpp +++ b/src/USER-REAXC/fix_qeq_reax.cpp @@ -367,7 +367,8 @@ void FixQEqReax::init_shielding() int ntypes; ntypes = atom->ntypes; - memory->create(shld,ntypes+1,ntypes+1,"qeq:shileding"); + if (shld == NULL) + memory->create(shld,ntypes+1,ntypes+1,"qeq:shileding"); for( i = 1; i <= ntypes; ++i ) for( j = 1; j <= ntypes; ++j ) diff --git a/src/USER-REAXC/fix_reaxc_species.cpp b/src/USER-REAXC/fix_reaxc_species.cpp index c063869f4d..5da1352e21 100644 --- a/src/USER-REAXC/fix_reaxc_species.cpp +++ b/src/USER-REAXC/fix_reaxc_species.cpp @@ -269,7 +269,8 @@ int FixReaxCSpecies::setmask() void FixReaxCSpecies::setup(int vflag) { ntotal = static_cast (atom->natoms); - memory->create(Name,ntypes,"reax/c/species:Name"); + if (Name == NULL) + memory->create(Name,ntypes,"reax/c/species:Name"); post_integrate(); }