Jump to content
Geochemist's Workbench Support Forum

Search the Community

Showing results for tags 'python'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • The Geochemist's Workbench
    • The Geochemist's Workbench
  • The Geochemist's Workbench Student
    • The Geochemist's Workbench Student

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


GWB activation code or serial number

Found 2 results

  1. I am trying to write the log10 total molality of Np(V) to file using python. The present line looks like this: fobj_ResultFile.write(Testcase + '\t' + '1180' + '\t' + 'log10(conc_oxidationstate(NpO2<+>))' + '\t'+ str(math.log10(myGWB.results('concentration "NpO2+"', 'molal')[0])) + '\n') A normal export for a single species looks like this fobj_ResultFile.write(Testcase + '\t' + '1181' + '\t' + 'log10(conc_solute(Ca[NpO2(OH)2]<+>))' + '\t'+ str(math.log10(myGWB.results('concentration aqueous "Ca[NpO2(OH)2]+"', 'molal')[0])) + '\n') My opinion was that by omitting the
  2. Hello everybody, in the attached test case I can retrieve all concentrations with species = myGWB.results("species") conc = myGWB.results("concentration aqueous", "mol/kg") print "\nThere are" , len(species) , "aqueous species.\n" for i in range(len(species)): print "%-4s = %10.4g mol/kg" % (species[i], conc[i]) However, if I export the results to file with ResultFile = Testcase + '_mod.out' fobj_ResultFile = open(ResultFile,'w') fobj_ResultFile.write(Testcase + '\t' + 'pcH' + '\t' + str(-(math.log10(myGWB.results('concentration aqueous H+', '
×
×
  • Create New...