Subversion Repositories wimsdev

Rev

Rev 7222 | Rev 13121 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7222 Rev 12963
Line 244... Line 244...
244
  if((al=l.suivant())) o << *al;
244
  if((al=l.suivant())) o << *al;
245
  if (l.sq()) o << "]";
245
  if (l.sq()) o << "]";
246
  return o;
246
  return o;
247
}
247
}
248
 
248
 
-
 
249
// from the header file:
-
 
250
// typedef enum { aqueous, aqueous_explicit, gas, liquid, sol } moltype;
249
const char* moltypeStr[] = { "aq", "g", "s" };
251
const char* moltypeStr[] = { "", "(aq)", "(g)", "(l)", "(s)" };
250
 
252
 
251
const std::string Molec::signature()const{
253
const std::string Molec::signature()const{
252
  std::ostringstream o;
254
  std::ostringstream o;
253
  o << liste();
255
  o << liste();
254
  if (charge()){
256
  if (charge()){
Line 291... Line 293...
291
  if (ch) {
293
  if (ch) {
292
    o << "^";
294
    o << "^";
293
    if(fabs(1.0*ch)!=1) o << fabs(1.0*ch);
295
    if(fabs(1.0*ch)!=1) o << fabs(1.0*ch);
294
    if(ch>0) o << "+"; else o << "-";
296
    if(ch>0) o << "+"; else o << "-";
295
  }
297
  }
-
 
298
  // the aqueous type is the default, so: no _(aq)
-
 
299
  // to have this suffix, on must make the type to aqueous_explicit
296
  if (!iswater() && !iselectron()) o << "_"  << moltypeStr[t];
300
  if (!iswater() && !iselectron() && t != aqueous) o << "_"  << moltypeStr[t];
297
}
301
}
298
 
302
 
299
void Molec::coeff( fraction f){
303
void Molec::coeff( fraction f){
300
  nb.i *= f.i;
304
  nb.i *= f.i;
301
  nb.d *= f.d;
305
  nb.d *= f.d;