Simpatico  v1.10
HomopolymerSG.h
1 #ifndef MCMD_HOMOPOLYMER_SG_H
2 #define MCMD_HOMOPOLYMER_SG_H
3 
4 /*
5 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
6 *
7 * Copyright 2010 - 2017, The Regents of the University of Minnesota
8 * Distributed under the terms of the GNU General Public License.
9 */
10 
11 #include "SpeciesMutator.h" // base class
12 #include <simp/species/Linear.h> // base class
13 #include <util/containers/Pair.h> // member
14 
15 namespace McMd
16 {
17 
18  using namespace Util;
19  using namespace Simp;
20 
31  {
32 
33  public:
34 
38  HomopolymerSG();
39 
43  virtual ~HomopolymerSG();
44 
48  virtual void readParameters(std::istream& in);
49 
56  virtual void setMoleculeState(Molecule& molecule, int stateId);
57 
63  virtual void save(Serializable::OArchive &ar);
64 
65  protected:
66 
72  virtual void readSpeciesParam(std::istream &in);
73 
79  virtual void loadSpeciesParam(Serializable::IArchive &ar);
80 
87  virtual int calculateAtomTypeId(int index) const;
88 
95  virtual int calculateBondTypeId(int index) const;
96 
97  #ifdef SIMP_ANGLE
98 
104  virtual int calculateAngleTypeId(int index) const;
105  #endif
106 
107  #ifdef SIMP_DIHEDRAL
108 
114  virtual int calculateDihedralTypeId(int index) const;
115  #endif
116 
117  private:
118 
119  // Type index for all bonds
120  int bondType_;
121 
122  #ifdef SIMP_ANGLE
123  // Type index for all angles (if any)
124  int angleType_;
125  #endif
126 
127  #ifdef SIMP_DIHEDRAL
128  // Type index for all dihedrals (if any)
129  int dihedralType_;
130  #endif
131 
132  // A Pair of atom type indexes.
133  // Atoms in a molecule with stateId = i have type typeIds_[i]
134  Pair<int> typeIds_;
135 
137  double weightRatio_;
138 
139  };
140 
141 }
142 #endif
A Homopolymer with a mutable type, for semigrand ensemble.
Definition: HomopolymerSG.h:30
Classes used by all simpatico molecular simulations.
Mix-in class for mutable subclasses of Species.
Saving / output archive for binary ostream.
Utility classes for scientific computation.
Definition: accumulators.mod:1
Saving archive for binary istream.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A physical molecule (a set of covalently bonded Atoms).
A Species of linear polymers (abstract).
Definition: Linear.h:36