fix of style related issues

This commit is contained in:
iafoss
2020-02-07 13:29:05 -05:00
parent 0204bf286b
commit 8c82c60f2f
24 changed files with 71 additions and 71 deletions

View File

@ -13,13 +13,13 @@ compute cnt/B command
=======================
compute cnt/Es\_tot command
=======================
============================
compute cnt/Eb\_tot command
=======================
============================
compute cnt/Et\_tot command
=======================
============================
Syntax
""""""

View File

@ -1,7 +1,7 @@
.. index:: pair\_style cnt/tpm
pair\_style cnt/tpm command
==========================
============================
Syntax
""""""
@ -34,8 +34,8 @@ simulations of interacting flexible nanotubes. The force field is based on the
mesoscopic computational model suggested in Ref. :ref:`[1] <Srivastava>`.
In this model, each nanotube is represented by a chain of mesoscopic elements
in the form of stretchable cylindrical segments, where each segment consists
of multiple atoms. Each nanotube is divided into segments by a sequent of nodes
placed on the nanotube centerline. This sequence of nodes determines the
of multiple atoms. Each nanotube is divided into segments by a sequence of
nodes placed on the nanotube centerline. This sequence of nodes determines the
spatial position of the cylindrical segments and defines the configuration of
the entire tube.

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -84,7 +84,7 @@ void AtomVecCNT::grow_reset()
tag = atom->tag; type = atom->type;
mask = atom->mask; image = atom->image;
x = atom->x; v = atom->v; f = atom->f;
rmass = atom->rmass;
radius = atom->radius;
length = atom->length;
@ -109,7 +109,7 @@ void AtomVecCNT::copy(int i, int j, int delflag)
v[j][0] = v[i][0];
v[j][1] = v[i][1];
v[j][2] = v[i][2];
rmass[j] = rmass[i];
radius[j] = radius[i];
length[j] = length[i];
@ -304,7 +304,7 @@ int AtomVecCNT::pack_border(int n, int *list, double *buf,
buf[m++] = ubuf(tag[j]).d;
buf[m++] = ubuf(type[j]).d;
buf[m++] = ubuf(mask[j]).d;
buf[m++] = rmass[j];
buf[m++] = radius[j];
buf[m++] = length[j];
@ -331,7 +331,7 @@ int AtomVecCNT::pack_border(int n, int *list, double *buf,
buf[m++] = ubuf(tag[j]).d;
buf[m++] = ubuf(type[j]).d;
buf[m++] = ubuf(mask[j]).d;
buf[m++] = rmass[j];
buf[m++] = radius[j];
buf[m++] = length[j];
@ -861,10 +861,10 @@ void AtomVecCNT::write_data(FILE *fp, int n, double **buf)
{
for (int i = 0; i < n; i++)
fprintf(fp, TAGINT_FORMAT " " TAGINT_FORMAT " %d "
TAGINT_FORMAT " " TAGINT_FORMAT
TAGINT_FORMAT " " TAGINT_FORMAT
" %-1.16e %-1.16e %-1.16e %d %-1.16e %-1.16e %-1.16e %d %d %d\n",
(tagint) ubuf(buf[i][0]).i, (tagint) ubuf(buf[i][1]).i,
(int) ubuf(buf[i][2]).i, (tagint) ubuf(buf[i][3]).i,
(int) ubuf(buf[i][2]).i, (tagint) ubuf(buf[i][3]).i,
(tagint) ubuf(buf[i][4]).i,
buf[i][5], buf[i][6], buf[i][7], (int) ubuf(buf[i][8]).i,
buf[i][9], buf[i][10], buf[i][11],
@ -878,7 +878,7 @@ void AtomVecCNT::write_data(FILE *fp, int n, double **buf)
int AtomVecCNT::write_data_hybrid(FILE *fp, double *buf)
{
fprintf(fp," " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
fprintf(fp," " TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
" %-1.16e %-1.16e %-1.16e %d",
(tagint) ubuf(buf[0]).i, (tagint) ubuf(buf[1]).i, (tagint) ubuf(buf[2]).i,
buf[3], buf[4], buf[5], (int)ubuf(buf[6]).i);

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -43,8 +43,8 @@ class AtomVecCNT : public AtomVec {
virtual int pack_border_vel(int, int *, double *, int, int *);
virtual void unpack_border(int, int, double *);
virtual void unpack_border_vel(int, int, double *);
int pack_border_hybrid(int, int *, double *);
int unpack_border_hybrid(int, int, double *);
int pack_border_hybrid(int, int *, double *);
int unpack_border_hybrid(int, int, double *);
virtual int pack_exchange(int, double *);
virtual int unpack_exchange(double *);
int size_restart();

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -18,7 +18,7 @@
#include <cmath>
template<typename T>
void vector_union(std::vector<T>& v1, std::vector<T>& v2,
void vector_union(std::vector<T>& v1, std::vector<T>& v2,
std::vector<T>& merged) {
std::sort(v1.begin(), v1.end());
std::sort(v2.begin(), v2.end());
@ -103,13 +103,13 @@ CNTList::CNTList(const Atom* atom, const NeighList* nblist, double rc2){
if (chain_list[i][0] != cnt_end && chain_list[i][0] != domain_end &&
g_id[i] < g_id[chain_list[i][0]]){
array2003<int, 2> tmp_c;
tmp_c[0] = i; tmp_c[1] = chain_list[i][0];
tmp_c[0] = i; tmp_c[1] = chain_list[i][0];
segments.push_back(tmp_c);
}
if (chain_list[i][1] != cnt_end && chain_list[i][1] != domain_end &&
g_id[i] < g_id[chain_list[i][1]]){
array2003<int, 2> tmp_c;
tmp_c[0] = i; tmp_c[1] = chain_list[i][1];
tmp_c[0] = i; tmp_c[1] = chain_list[i][1];
segments.push_back(tmp_c);
}
}
@ -146,22 +146,22 @@ CNTList::CNTList(const Atom* atom, const NeighList* nblist, double rc2){
if (nnb > 0) {
int idx_s = nb_list[0];
for (int j = 0; j < nnb; j++) {
//if nodes are not continous in the sorted representation
//if nodes are not continous in the sorted representation
//or represent chain ends, create a new neighbor chain
int idx_next = chain_list[index_list[nb_list[j]]][1];
if ((j == nnb - 1) || (nb_list[j] + 1 != nb_list[j+1]) ||
if ((j == nnb - 1) || (nb_list[j] + 1 != nb_list[j+1]) ||
(idx_next == cnt_end) || (idx_next == domain_end)) {
int idx_f = nb_list[j];
array2003<int, 2> chain;
chain[0] = idx_s;
chain[1] = nb_list[j];
//make sure that segments having at least one node
//make sure that segments having at least one node
//in the neighbor list are included
int idx0 = index_list[chain[0]]; // real id of the ends
int idx1 = index_list[chain[1]];
if (chain_list[idx0][0] != cnt_end &&
chain_list[idx0][0] != domain_end) chain[0] -= 1;
if (chain_list[idx1][1] != cnt_end &&
if (chain_list[idx1][1] != cnt_end &&
chain_list[idx1][1] != domain_end) chain[1] += 1;
if(chain[0] != chain[1]) nb_chains[i].push_back(chain);
idx_s = (j == nnb - 1) ? -1 : nb_list[j + 1];

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -39,7 +39,7 @@ public:
const std::vector<array2003<int,2> >& get_segments() const;
//list of triplets
const std::vector<array2003<int,3> >& get_triplets() const;
//list of neigbor chains [start,end] for segments
//list of neigbor chains [start,end] for segments
//(use idx() to get real indexes)
const std::vector<std::vector<array2003<int,2> > >& get_nbs() const;
//convert idx from sorted representation to real idx
@ -67,7 +67,7 @@ private:
//=============================================================================
inline const std::vector<std::vector<array2003<int, 2> > > & CNTList::get_nbs()
inline const std::vector<std::vector<array2003<int, 2> > > & CNTList::get_nbs()
const {
return nb_chains;
}

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -80,7 +80,7 @@ void ComputeCNT_Es::compute_peratom()
// clear local energy array
for (i = 0; i < ntotal; i++) energy[i] = 0.0;
if (force->pair){
try {
PairCNTTPM* pair = dynamic_cast<PairCNTTPM*>(force->pair);

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -80,7 +80,7 @@ void ComputeCNT_Et::compute_peratom()
// clear local energy array
for (i = 0; i < ntotal; i++) energy[i] = 0.0;
if (force->pair){
try {
PairCNTTPM* pair = dynamic_cast<PairCNTTPM*>(force->pair);

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -19,12 +19,12 @@ extern "C" {
// see ExportCNT.f90 in lib/cnt for function details
void TPBInit();
void TPMInit(const int& M, const int& N);
void SetTablePath(const char* TPMSSTPFile, const int& N1,
void SetTablePath(const char* TPMSSTPFile, const int& N1,
const char* TPMAFile, const int& N2);
void InitCNTPotModule(const int& STRModel, const int& STRParams,
const int& YMType, const int& BNDModel, const double& Rref);
double get_R();
void TubeStretchingForceField(double& U1, double& U2, double* F1,
@ -32,17 +32,17 @@ extern "C" {
const double& R12, const double& L12);
void TubeBendingForceField(double& U1, double& U2, double& U3, double* F1,
double* F2, double* F3, double* S1, double* S2, double* S3,
double* F2, double* F3, double* S1, double* S2, double* S3,
const double* X1, const double* X2, const double* X3, const double& R123,
const double& L123, int& BBF2 );
void SegmentTubeForceField(double& U1, double& U2, double *U, double* F1,
double* F2, double* F, double* Fe, double* S1, double* S2, double* S,
double* Se, const double* X1, const double* X2, const double& R12,
const int& N, const double* X, const double* Xe, const int* BBF,
const double& R, const int& E1, const int& E2, const int& Ee,
const int& N, const double* X, const double* Xe, const int* BBF,
const double& R, const int& E1, const int& E2, const int& Ee,
const int& TPMType);
#ifdef __cplusplus
}
#endif

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -47,7 +47,7 @@ PairCNTTPM::PairCNTTPM(LAMMPS *lmp) : Pair(lmp) {
TPMType = 0; // Inter-tube segment-segment interaction
tab_path = NULL;
tab_path_length = 0;
eatom_s = NULL;
eatom_b = NULL;
eatom_t = NULL;
@ -61,7 +61,7 @@ PairCNTTPM::~PairCNTTPM()
memory->destroy(setflag);
memory->destroy(cutsq);
memory->destroy(cut);
memory->destroy(eatom_s);
memory->destroy(eatom_b);
memory->destroy(eatom_t);
@ -153,7 +153,7 @@ void PairCNTTPM::compute(int eflag, int vflag){
double* S1 = &(s_sort[9*idx_s0]);
double* S2 = &(s_sort[9*idx_s1]);
double R12 = r[s[0]]; if (R12 > Rmax) Rmax = R12;
if (std::abs(R12 - RT) > 1e-3)
if (std::abs(R12 - RT) > 1e-3)
error->all(FLERR,"Inconsistent input and potential table");
//assume that the length of the segment is defined by the node with
//smallest global id
@ -162,7 +162,7 @@ void PairCNTTPM::compute(int eflag, int vflag){
for (int nc = 0; nc < cntlist.get_nbs()[i].size(); nc++){
//id of the beginning and end of the chain in the sorted representation
const array2003<int,2>& chain = cntlist.get_nbs()[i][nc];
const array2003<int,2>& chain = cntlist.get_nbs()[i][nc];
int N = chain[1] - chain[0] + 1; //number of elements in the chain
int end1 = cntlist.get_idx(chain[0]); //chain ends (real representation)
int end2 = cntlist.get_idx(chain[1]);
@ -178,8 +178,8 @@ void PairCNTTPM::compute(int eflag, int vflag){
int Ee = 0;
double* Xe = X; double* Fe = F; double* Se = S;
if (!E1 && cntlist.get_triplet(end1)[0] != CNTList::domain_end &&
cntlist.get_triplet(cntlist.get_triplet(end1)[0])[0] ==
if (!E1 && cntlist.get_triplet(end1)[0] != CNTList::domain_end &&
cntlist.get_triplet(cntlist.get_triplet(end1)[0])[0] ==
CNTList::cnt_end){
Ee = 1;
int idx = cntlist.get_idxb(cntlist.get_triplet(end1)[0]);
@ -187,8 +187,8 @@ void PairCNTTPM::compute(int eflag, int vflag){
Fe = &(f_sort[3*idx]);
Se = &(s_sort[9*idx]);
}
else if (!E2 && cntlist.get_triplet(end2)[2] != CNTList::domain_end &&
cntlist.get_triplet(cntlist.get_triplet(end2)[2])[2] ==
else if (!E2 && cntlist.get_triplet(end2)[2] != CNTList::domain_end &&
cntlist.get_triplet(cntlist.get_triplet(end2)[2])[2] ==
CNTList::cnt_end){
Ee = 2;
int idx = cntlist.get_idxb(cntlist.get_triplet(end2)[2]);
@ -196,7 +196,7 @@ void PairCNTTPM::compute(int eflag, int vflag){
Fe = &(f_sort[3*idx]);
Se = &(s_sort[9*idx]);
}
SegmentTubeForceField(U1t, U2t, Ut, F1, F2, F, Fe, S1, S2, S, Se, X1,
X2, R12, N, X, Xe, BBF, R, E1, E2, Ee, TPMType);
}

View File

@ -9,7 +9,7 @@
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
Contributing author: Maxim Shugaev (UVA), mvs9t@virginia.edu
------------------------------------------------------------------------- */
@ -46,15 +46,15 @@ class PairCNTTPM : public Pair {
double energy_b; // accumulated energies for bending
double energy_t; // accumulated energies for tube-tube interaction
double *eatom_s, *eatom_b, *eatom_t; // accumulated per-atom values
protected:
int BendingMode, TPMType;
char* tab_path;
int tab_path_length;
double cut_global;
double **cut;
virtual void allocate();
};
@ -91,7 +91,7 @@ Self-explanatory.
E: Inconsistent input and potential table
The tube diameter is inconsistent with the chirality specified
The tube diameter is inconsistent with the chirality specified
during generation of the potential table.
*/

View File

@ -109,7 +109,7 @@ Atom::Atom(LAMMPS *lmp) : Pointers(lmp)
edpd_temp = edpd_flux = edpd_cv = NULL;
// USER-CNT package
length = NULL;
buckling = NULL;
bond_cnt = NULL;
@ -373,7 +373,7 @@ Atom::~Atom()
for (int i = 0; i < nmolecule; i++) delete molecules[i];
memory->sfree(molecules);
// USER-CNT package
memory->destroy(length);
memory->destroy(buckling);
@ -2295,7 +2295,7 @@ void *Atom::extract(char *name)
if (strcmp(name,"dpdTheta") == 0) return (void *) dpdTheta;
if (strcmp(name,"edpd_temp") == 0) return (void *) edpd_temp;
// USER-CNT package
if (strcmp(name,"length") == 0) return (void *) length;
if (strcmp(name,"buckling") == 0) return (void *) buckling;