Skip to content

Commit

Permalink
Merge branch 'compile-warnings' into 'master'
Browse files Browse the repository at this point in the history
Compile warnings

See merge request !23
  • Loading branch information
oostenbrink committed Jan 25, 2018
2 parents bfdd511 + 46871c8 commit faf09e3
Show file tree
Hide file tree
Showing 109 changed files with 1,733 additions and 613 deletions.
3 changes: 3 additions & 0 deletions gromos++/programs/0index.doxy
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* - Drazen Petrov @anchor dp (dp)
* - Anita de Ruiter @anchor adr (adr)
* - Martina Setz @anchor ms (ms)
* - Stefan Bachmann @anchor sb (sb)
* </p>
*
* <h2>Available Programs:</h2>
Expand All @@ -60,6 +61,8 @@
* - @ref com_top combine molecular topology files into one
* - @ref con_top convert topology to different force field version
* - @ref copy_box repeats a simulation box in a given direction
* - @ref cos_dipole calculate molecular dipoles including COS charges
* - @ref cos_epsilon calculate relative permittivity and box dipole moment autocorrelations
* - @ref cry perform symmetry operations on molecules
* - @ref cry_rms perform RMSD and RMSF calculations based on crystallographic symmetry.
* - @ref dfmult calculates multiple free energy differences
Expand Down
7 changes: 6 additions & 1 deletion gromos++/programs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ bin_PROGRAMS = rmsd\
trs_ana\
dGslv_pbsolv\
dfgrid\
contactnum
contactnum\
cos_dipole\
cos_epsilon

nhoparam_SOURCES = nhoparam.cc
frameout_SOURCES = frameout.cc
Expand Down Expand Up @@ -207,6 +209,9 @@ trs_ana_SOURCES = trs_ana.cc
dGslv_pbsolv_SOURCES = dGslv_pbsolv.cc
dfgrid_SOURCES = dfgrid.cc
contactnum_SOURCES = contactnum.cc
cos_dipole_SOURCES = cos_dipole.cc
cos_epsilon_SOURCES = cos_epsilon.cc


LDADD = $(top_builddir)/src/libgromos.la

Expand Down
4 changes: 2 additions & 2 deletions gromos++/programs/atominfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int main(int argc, char **argv){
<< setw(12) << "Atom Code"
<< endl;

for(int i=0; i < as.size(); ++i){
for(unsigned int i=0; i < as.size(); ++i){
if(as.atom()[i]->type()==utils::spec_virtual){
utils::AtomSpecifier conf=as.atom()[i]->conf();
cout << "----------------------------------------"
Expand Down Expand Up @@ -202,7 +202,7 @@ int main(int argc, char **argv){

}

for(int j=0; j< conf.size(); ++j){
for(unsigned int j=0; j< conf.size(); ++j){
cout << setw(13) << conf.toString(j)
<< setw(10) << conf.gromosAtom(j)+1
<< setw(10) << conf.resnum(j)+1
Expand Down
2 changes: 1 addition & 1 deletion gromos++/programs/bilayer_dist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int main(int argc, char** argv) {
min_d = -sys.box().M().abs()/2; // before was: cm[2]-sys.box()[2]/2;
max_d = sys.box().M().abs()/2;

for(int i = 0; i < selection.size(); i++) {
for(unsigned int i = 0; i < selection.size(); i++) {
Vec & vector1 = selection.pos(i);
Vec dist = vector1 - pbc->nearestImage(vector1, cm, sys.box());
zcoord.push_back(dist[2]);
Expand Down
8 changes: 4 additions & 4 deletions gromos++/programs/check_box.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ int main(int argc, char **argv){

//init variables
double overall_min_dist2=1e4;
int limit = 1;
unsigned int limit = 1;
double cutoff = 1.4;
double cutoff2 = cutoff*cutoff;
bool no_cutoff=false; //do not report all distances
Expand Down Expand Up @@ -359,12 +359,12 @@ int main(int argc, char **argv){
//if 2 neighbours have the same atoms (=there is only 1 cube total in this direction), only half of the distances must be calculated:
bool skip=cubes.same_cube(c);

for(int i=0; i < cubes.cube_i_atomlist(c).size(); ++i ){
for(unsigned int i=0; i < cubes.cube_i_atomlist(c).size(); ++i ){

int atom_i = cubes.cube_i_atomlist(c)[i];
Vec atom_i_pos = atoms.pos(atom_i);

int j=0;
unsigned int j=0;
if(skip)
j=i+1;

Expand Down Expand Up @@ -438,7 +438,7 @@ int main(int argc, char **argv){
cout << "###" << endl;
cout << "# Time Distance [nm] Atom A - Atom B Mol:Residue Atom A - Mol:Resiude Atom B" << endl;
double itime=0;
for (int ii =0; ii < output.size(); ii++) {
for (unsigned int ii =0; ii < output.size(); ii++) {
for(vec_it = output[ii].begin(); vec_it != output[ii].end(); ++vec_it){

if (read_time) itime=vec_it->time;
Expand Down
8 changes: 4 additions & 4 deletions gromos++/programs/close_pair.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ int main(int argc, char **argv) {
debug = atoi(args["debug"].c_str());
}
if (debug == 1) {
for (int i = 0; i < groupA.size(); ++i) {
for (unsigned int i = 0; i < groupA.size(); ++i) {
cout << "# groupA mol " << groupA.mol(i) << " size " << groupA.size() << endl;
}
for (int j = 0; j < groupB.size(); ++j) {
for (unsigned int j = 0; j < groupB.size(); ++j) {
cout << "# groupB mol " << groupB.mol(j) << " size " << groupB.size() << endl;
}
}
Expand Down Expand Up @@ -224,7 +224,7 @@ int main(int argc, char **argv) {

int pass = 1000;

for (int i = 0; i < groupA.size(); ++i) {
for (unsigned int i = 0; i < groupA.size(); ++i) {
// skip hydrogen atoms
int m = groupA.mol(i);

Expand All @@ -236,7 +236,7 @@ int main(int argc, char **argv) {
"atom name not specified properly.");
if (m != pass && m > 0)
if (groupA.mass(i) != 1.008) {
for (int j = 0; j < groupB.size(); ++j) {
for (unsigned int j = 0; j < groupB.size(); ++j) {
if (debug >= 3) {
cout << "# groupB size " << groupB.size() << endl;
cout << "# molA " << groupA.mol(i)
Expand Down
6 changes: 3 additions & 3 deletions gromos++/programs/cog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ int main(int argc, char **argv){
}
}

for(int a=0; a<atomspec.size(); a++){
for(unsigned int a=0; a<atomspec.size(); a++){
osys.addMolecule(mt_spec);
osys.mol(molnum).initPos();
molnum++;
Expand Down Expand Up @@ -266,10 +266,10 @@ int main(int argc, char **argv){
}
}

for (int i=0; i < atomspec.size(); i++) {
for (unsigned int i=0; i < atomspec.size(); i++) {
Vec cog(0.0,0.0,0.0);
double molmass=0;
for (int a=0; a < atomspec[i].size(); a++) {
for (unsigned int a=0; a < atomspec[i].size(); a++) {
if(inc=="cog"){
cog+=atomspec[i].pos(a);
}
Expand Down
20 changes: 8 additions & 12 deletions gromos++/programs/contactnum.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ double fastpow(double base, int exp);
int main(int argc, char **argv){
Argument_List knowns;
knowns << "topo" << "traj" << "atoms" << "cutoffs" << "pbc" << "exp"
<< "time" << "debug" << "printpairs" << "excludemass";
<< "time" << "printpairs" << "excludemass";

string usage = "# " + string(argv[0]);
usage += "\n\t@topo <molecular topology file>\n";
Expand Down Expand Up @@ -120,10 +120,6 @@ int main(int argc, char **argv){
InTopology it(args["topo"]);
System sys(it.system());

int debug=0;
if(args.count("debug")>0)
debug=1;

if (args.count("pbc") <=0) {
cout << "# WARNING: no @pbc argument found - no gathering will be done!";
}
Expand Down Expand Up @@ -189,15 +185,15 @@ int main(int argc, char **argv){

// exclude atoms with given mass
for (int i=atomgroup1.size()-1; i>=0 ; i--) {
for(int j=0; j<excludemass.size(); j++) {
for(unsigned int j=0; j<excludemass.size(); j++) {
if (atomgroup1.mass(i)== excludemass[j]) {
//cerr << "atom " << atomgroup1.atom(i) << " mass " << atomgroup1.mass(i)<<endl;
atomgroup1.removeAtom(i);
}
}
}
for (int i=atomgroup2.size()-1; i>=0 ; i--) {
for(int j=0; j<excludemass.size(); j++) {
for(unsigned int j=0; j<excludemass.size(); j++) {
if (atomgroup2.mass(i)== excludemass[j]){
//cerr << "atom " << atomgroup2.atom(i) << " mass " << atomgroup2.mass(i) << endl;
atomgroup2.removeAtom(i);
Expand All @@ -213,7 +209,7 @@ int main(int argc, char **argv){
// Parse boundary conditions for sys
Boundary *pbc = BoundaryParser::boundary(sys, args);

for (int cut=0; cut<cutoffs.size(); cut++) {
for (unsigned int cut=0; cut<cutoffs.size(); cut++) {
cout <<setw(15) << cutoffs[cut];
}
cout << endl;
Expand All @@ -240,10 +236,10 @@ int main(int argc, char **argv){

cout.precision(2);
cout << time;
for (int cut=0; cut<cutoffs.size(); cut++) {
for (unsigned int cut=0; cut<cutoffs.size(); cut++) {
double ct=0;
for (int i=0; i< atomgroup1.size(); i++) {
for (int j=0; j < atomgroup2.size(); j++) {
for (unsigned int i=0; i< atomgroup1.size(); i++) {
for (unsigned int j=0; j < atomgroup2.size(); j++) {
double func;
gmath::Vec v = atomgroup1.pos(i) - pbc->nearestImage(atomgroup1.pos(i), atomgroup2.pos(j), sys.box());
double rdist=v.abs();
Expand All @@ -263,7 +259,7 @@ int main(int argc, char **argv){
ic.close();
}
cout <<"# averages ";
for (int i=0; i<cutoffs.size(); i++) {
for (unsigned int i=0; i<cutoffs.size(); i++) {
cout << setw(15) << ct_ave[i]/numFrames;
}
cout << endl;
Expand Down
Loading

0 comments on commit faf09e3

Please sign in to comment.