PSCF v1.2
SolventSpecies.h
1#ifndef PSCF_SOLVENT_DESCRIPTOR_H
2#define PSCF_SOLVENT_DESCRIPTOR_H
3
4/*
5* PSCF - Polymer Self-Consistent Field Theory
6*
7* Copyright 2016 - 2022, The Regents of the University of Minnesota
8* Distributed under the terms of the GNU General Public License.
9*/
10
11#include <pscf/chem/Species.h> // base class
12#include <util/param/ParamComposite.h> // base class
13
14namespace Pscf {
15
16 using namespace Util;
17
29 class SolventSpecies : public Species, public ParamComposite
30 {
31
32 public:
33
38
43
49 virtual void readParameters(std::istream& in);
50
53
63 void setPhi(double phi);
64
74 void setMu(double mu);
75
81 void setMonomerId(int monomerId);
82
92 void setSize(double size);
93
97
101 int monomerId() const;
102
106 double size() const;
107
109
110 // Inherited accessor functions
111 using Pscf::Species::phi;
112 using Pscf::Species::mu;
113 using Pscf::Species::q;
115
116 protected:
117
118 // Inherited data members
120 using Pscf::Species::mu_;
121 using Pscf::Species::q_;
123
126
128 double size_;
129
130 };
131
132 // Inline member functions
133
134 /*
135 * Get the monomer type id.
136 */
137 inline int SolventSpecies::monomerId() const
138 { return monomerId_; }
139
140 /*
141 * Get the size (number of monomers) in this block.
142 */
143 inline double SolventSpecies::size() const
144 { return size_; }
145
146}
147#endif
Descriptor for a solvent species.
SolventSpecies()
Constructor.
void setMonomerId(int monomerId)
Set the monomer id for this solvent.
void setMu(double mu)
Set input value of mu (chemical potential), if ensemble is open.
int monomerId_
Identifier for the associated monomer type.
void setSize(double size)
Set the molecular volume of this solvent species.
~SolventSpecies()
Constructor.
void setPhi(double phi)
Set input value of phi (volume fraction), if ensemble is closed.
virtual void readParameters(std::istream &in)
Read and initialize.
int monomerId() const
Get the monomer type id.
double size_
Size of this block = volume / monomer reference volume.
double size() const
Get the size (number of monomers) in this solvent.
Base class for a molecular species (polymer or solvent).
Definition Species.h:30
double phi() const
Get the overall volume fraction for this species.
Definition Species.h:90
Ensemble ensemble_
Statistical ensemble for this species (open or closed).
Definition Species.h:83
Ensemble ensemble()
Get the statistical ensemble for this species (open or closed).
Definition Species.h:102
double phi_
Volume fraction, set by either setPhi or a compute function.
Definition Species.h:68
double mu_
Chemical potential, set by either setPhi or a compute function.
Definition Species.h:73
double q_
Partition function, set in subclass by a compute function.
Definition Species.h:78
double mu() const
Get the chemical potential for this species (units kT=1).
Definition Species.h:96
double q() const
Get the molecular partition function for this species.
An object that can read multiple parameters from file.
PSCF package top-level namespace.
Definition param_pc.dox:1
Utility classes for scientific computation.