Simpatico  v1.10
Diblock.h
1 #ifndef SIMP_DIBLOCK_H
2 #define SIMP_DIBLOCK_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 "Linear.h"
12 
13 namespace Simp
14 {
15 
16  using namespace Util;
17 
27  class Diblock : public Linear
28  {
29 
30  public:
31 
33  Diblock();
34 
36  virtual ~Diblock()
37  {}
38 
44  virtual void save(Serializable::OArchive &ar);
45 
46  protected:
47 
49  int blockLengths_[2];
50 
52  int atomTypes_[2];
53 
54  int bondType_;
55 
56  #ifdef SIMP_ANGLE
57  int angleType_;
58  #endif
59 
60  #ifdef SIMP_DIHEDRAL
61  int dihedralType_;
62  #endif
63 
69  virtual void readSpeciesParam(std::istream &in);
70 
76  virtual void loadSpeciesParam(Serializable::IArchive &ar);
77 
84  virtual int calculateAtomTypeId(int index) const;
85 
92  virtual int calculateBondTypeId(int index) const;
93 
94  #ifdef SIMP_ANGLE
95 
101  virtual int calculateAngleTypeId(int index) const;
102  #endif
103 
104  #ifdef SIMP_DIHEDRAL
105 
111  virtual int calculateDihedralTypeId(int index) const;
112  #endif
113 
114  };
115 
116 }
117 #endif
virtual int calculateAtomTypeId(int index) const
Return the atom type for a specific atom.
Definition: Diblock.cpp:155
virtual int calculateDihedralTypeId(int index) const
Return same dihedral type for any dihedral in any chain.
Definition: Diblock.cpp:182
virtual int calculateBondTypeId(int index) const
Return same bond type for any bond in any chain.
Definition: Diblock.cpp:167
A linear diblock copolymer chain.
Definition: Diblock.h:27
Classes used by all simpatico molecular simulations.
virtual void loadSpeciesParam(Serializable::IArchive &ar)
Load species structure from an Archive.
Definition: Diblock.cpp:86
virtual ~Diblock()
Destructor.
Definition: Diblock.h:36
Saving / output archive for binary ostream.
virtual void readSpeciesParam(std::istream &in)
Read block lengths length and and types.
Definition: Diblock.cpp:38
Diblock()
Default constructor.
Definition: Diblock.cpp:19
Utility classes for scientific computation.
Definition: accumulators.mod:1
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
Definition: Diblock.cpp:132
Saving archive for binary istream.
int atomTypes_[2]
Particle type ids for each block.
Definition: Diblock.h:52
A Species of linear polymers (abstract).
Definition: Linear.h:36
virtual int calculateAngleTypeId(int index) const
Return same angle type for any angle in any chain.
Definition: Diblock.cpp:174
int blockLengths_[2]
Number of particles in each block.
Definition: Diblock.h:49