diff --git a/src/io/ASCIIReader.cpp b/src/io/ASCIIReader.cpp index e3f903af8e..daa32f8e2a 100644 --- a/src/io/ASCIIReader.cpp +++ b/src/io/ASCIIReader.cpp @@ -12,6 +12,8 @@ #include "ensemble/EnsembleBase.h" #include "Simulation.h" #include "molecules/Molecule.h" +#include "molecules/mixingrules/MixingRuleBase.h" +#include "molecules/mixingrules/LorentzBerthelot.h" #ifdef ENABLE_MPI #include "parallel/ParticleData.h" @@ -207,7 +209,24 @@ void ASCIIReader::readPhaseSpaceHeader(Domain* domain, double timestep) { } #endif - // Mixing coefficients have to be set via the config xml + // Mixing coefficients + for(unsigned int cidi = 0; cidi < numcomponents-1; cidi++) { + for(unsigned int cidj = cidi + 1; cidj <= numcomponents-1; cidj++) { + double xi, eta; + _phaseSpaceHeaderFileStream >> xi >> eta; +#ifndef NDEBUG + Log::global_log->debug() << "Mixing: " << cidi+1 << " + " << cidj+1 + << " : xi=" << xi << " eta=" << eta << std::endl; +#endif + // Only LB mixing rule is supported for now + LorentzBerthelotMixingRule* mixingrule = new LorentzBerthelotMixingRule(); + mixingrule->setCid1(cidi); + mixingrule->setCid2(cidj); + mixingrule->setEta(eta); + mixingrule->setXi(xi); + _simulation.getEnsemble()->setMixingrule(mixingrule); + } + } // read in global factor \epsilon_{RF} // FIXME: Maybe this should go better to a seperate token?! diff --git a/test_input/VectorizationMultiComponentMultiPotentials.inp b/test_input/VectorizationMultiComponentMultiPotentials.inp index 7a4cbba458..b6ece3dff6 100644 --- a/test_input/VectorizationMultiComponentMultiPotentials.inp +++ b/test_input/VectorizationMultiComponentMultiPotentials.inp @@ -27,6 +27,7 @@ mardyn trunk 20120726 1.43042933 -0.983266012 0 0.001008 0.52 -1.43042933 -0.983266012 0 0.001008 0.52 0.00219467882 0.00412499417 0.00631967299 +1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1e+10 NumberOfMolecules 250 MoleculeFormat ICRVQD diff --git a/test_input/VectorizationMultiComponentMultiPotentials_50_molecules.inp b/test_input/VectorizationMultiComponentMultiPotentials_50_molecules.inp index 9e9d2e3518..a14ac41a9b 100644 --- a/test_input/VectorizationMultiComponentMultiPotentials_50_molecules.inp +++ b/test_input/VectorizationMultiComponentMultiPotentials_50_molecules.inp @@ -16,6 +16,7 @@ mardyn trunk 20120726 1.43042933 -0.983266012 0 0.001008 0.52 -1.43042933 -0.983266012 0 0.001008 0.52 0.00219467882 0.00412499417 0.00631967299 +1 1 1e+10 NumberOfMolecules 50 MoleculeFormat ICRVQD