PSCF v1.1
SolventDescriptor.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
24 {
25
26 public:
27
32
37
43 virtual void readParameters(std::istream& in);
44
47
57 void setPhi(double phi);
58
68 void setMu(double mu);
69
75 void setMonomerId(int monomerId);
76
84 void setSize(double size);
85
89
93 int monomerId() const;
94
98 double size() const;
99
101
102 // Inherited accessor functions
103 using Pscf::Species::phi;
104 using Pscf::Species::mu;
105 using Pscf::Species::q;
107
108 protected:
109
110 // Inherited data members
112 using Pscf::Species::mu_;
113 using Pscf::Species::q_;
115
118
120 double size_;
121
122 };
123
124 // Inline member functions
125
126 /*
127 * Get the monomer type id.
128 */
130 { return monomerId_; }
131
132 /*
133 * Get the size (number of monomers) in this block.
134 */
135 inline double SolventDescriptor::size() const
136 { return size_; }
137
138}
139#endif
Descriptor for a solvent species.
double size_
Size of this block = volume / monomer reference volume.
double size() const
Get the size (number of monomers) in this solvent.
void setPhi(double phi)
Set input value of phi (volume fraction), if ensemble is closed.
void setMu(double mu)
Set input value of mu (chemical potential), if ensemble is open.
void setSize(double size)
Set the size or volume of this solvent species.
int monomerId() const
Get the monomer type id.
virtual void readParameters(std::istream &in)
Read and initialize.
int monomerId_
Identifier for the associated monomer type.
void setMonomerId(int monomerId)
Set the monomer id for 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 compute function.
Definition: Species.h:68
double mu_
Chemical potential, set by either setPhi or compute function.
Definition: Species.h:73
double q_
Partition function, set by 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.
C++ namespace for polymer self-consistent field theory (PSCF).
Utility classes for scientific computation.
Definition: accumulators.mod:1