git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@14515 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
34
src/set.cpp
34
src/set.cpp
@ -44,7 +44,8 @@ enum{ATOM_SELECT,MOL_SELECT,TYPE_SELECT,GROUP_SELECT,REGION_SELECT};
|
||||
enum{TYPE,TYPE_FRACTION,MOLECULE,X,Y,Z,CHARGE,MASS,SHAPE,LENGTH,TRI,
|
||||
DIPOLE,DIPOLE_RANDOM,QUAT,QUAT_RANDOM,THETA,THETA_RANDOM,ANGMOM,OMEGA,
|
||||
DIAMETER,DENSITY,VOLUME,IMAGE,BOND,ANGLE,DIHEDRAL,IMPROPER,
|
||||
MESO_E,MESO_CV,MESO_RHO,SMD_MASS_DENSITY,SMD_CONTACT_RADIUS,INAME,DNAME};
|
||||
MESO_E,MESO_CV,MESO_RHO,SMD_MASS_DENSITY,SMD_CONTACT_RADIUS,DPDTHETA,
|
||||
INAME,DNAME};
|
||||
|
||||
#define BIG INT_MAX
|
||||
|
||||
@ -381,51 +382,61 @@ void Set::command(int narg, char **arg)
|
||||
topology(IMPROPER);
|
||||
iarg += 2;
|
||||
|
||||
} else if (strcmp(arg[iarg],"meso_e") == 0) {
|
||||
} else if (strcmp(arg[iarg],"meso/e") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
|
||||
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
|
||||
else dvalue = force->numeric(FLERR,arg[iarg+1]);
|
||||
if (!atom->e_flag)
|
||||
error->all(FLERR,"Cannot set this attribute for this atom style");
|
||||
error->all(FLERR,"Cannot set meso/e for this atom style");
|
||||
set(MESO_E);
|
||||
iarg += 2;
|
||||
|
||||
} else if (strcmp(arg[iarg],"meso_cv") == 0) {
|
||||
} else if (strcmp(arg[iarg],"meso/cv") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
|
||||
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
|
||||
else dvalue = force->numeric(FLERR,arg[iarg+1]);
|
||||
if (!atom->cv_flag)
|
||||
error->all(FLERR,"Cannot set this attribute for this atom style");
|
||||
error->all(FLERR,"Cannot set meso/cv for this atom style");
|
||||
set(MESO_CV);
|
||||
iarg += 2;
|
||||
|
||||
} else if (strcmp(arg[iarg],"meso_rho") == 0) {
|
||||
} else if (strcmp(arg[iarg],"meso/rho") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
|
||||
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
|
||||
else dvalue = force->numeric(FLERR,arg[iarg+1]);
|
||||
if (!atom->rho_flag)
|
||||
error->all(FLERR,"Cannot set meso_rho for this atom style");
|
||||
error->all(FLERR,"Cannot set meso/rho for this atom style");
|
||||
set(MESO_RHO);
|
||||
iarg += 2;
|
||||
|
||||
} else if (strcmp(arg[iarg],"smd_mass_density") == 0) {
|
||||
} else if (strcmp(arg[iarg],"smd/mass/density") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
|
||||
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
|
||||
else dvalue = force->numeric(FLERR,arg[iarg+1]);
|
||||
if (!atom->smd_flag)
|
||||
error->all(FLERR,"Cannot set smd_mass_density for this atom style");
|
||||
error->all(FLERR,"Cannot set smd/mass/density for this atom style");
|
||||
set(SMD_MASS_DENSITY);
|
||||
iarg += 2;
|
||||
|
||||
} else if (strcmp(arg[iarg],"smd_contact_radius") == 0) {
|
||||
} else if (strcmp(arg[iarg],"smd/contact/radius") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
|
||||
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
|
||||
else dvalue = force->numeric(FLERR,arg[iarg+1]);
|
||||
if (!atom->smd_flag)
|
||||
error->all(FLERR,"Cannot set smd_contact_radius for this atom style");
|
||||
error->all(FLERR,"Cannot set smd/contact/radius "
|
||||
"for this atom style");
|
||||
set(SMD_CONTACT_RADIUS);
|
||||
iarg += 2;
|
||||
|
||||
} else if (strcmp(arg[iarg],"dpd/theta") == 0) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
|
||||
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
|
||||
else dvalue = force->numeric(FLERR,arg[iarg+1]);
|
||||
if (!atom->dpd_flag)
|
||||
error->all(FLERR,"Cannot set dpd/theta for this atom style");
|
||||
set(DPDTHETA);
|
||||
iarg += 2;
|
||||
|
||||
} else if (strstr(arg[iarg],"i_") == arg[iarg]) {
|
||||
if (iarg+2 > narg) error->all(FLERR,"Illegal set command");
|
||||
if (strstr(arg[iarg+1],"v_") == arg[iarg+1]) varparse(arg[iarg+1],1);
|
||||
@ -621,6 +632,7 @@ void Set::set(int keyword)
|
||||
atom->rmass[i] = atom->vfrac[i] * dvalue;
|
||||
}
|
||||
else if (keyword == SMD_CONTACT_RADIUS) atom->contact_radius[i] = dvalue;
|
||||
else if (keyword == DPDTHETA) atom->dpdTheta[i] = dvalue;
|
||||
|
||||
// set shape of ellipsoidal particle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user