Simpatico  v1.10
Multiblock.h
1 #ifndef SIMP_MULTIBLOCK_H
2 #define SIMP_MULTIBLOCK_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 
26  class Multiblock : public Linear
27  {
28 
29  public:
30 
32  Multiblock();
33 
35  virtual ~Multiblock()
36  {}
37 
43  virtual void save(Serializable::OArchive &ar);
44 
45  protected:
46 
48  int nBlock_;
49 
52 
55 
58 
59  int bondType_;
60 
61  #ifdef SIMP_ANGLE
62  int angleType_;
63  #endif
64 
65  #ifdef SIMP_DIHEDRAL
66  int dihedralType_;
67  #endif
68 
74  virtual void readSpeciesParam(std::istream &in);
75 
81  virtual void loadSpeciesParam(Serializable::IArchive &ar);
82 
89  virtual int calculateAtomTypeId(int index) const;
90 
97  virtual int calculateBondTypeId(int index) const;
98 
99  #ifdef SIMP_ANGLE
100 
106  virtual int calculateAngleTypeId(int index) const;
107  #endif
108 
109  #ifdef SIMP_DIHEDRAL
110 
116  virtual int calculateDihedralTypeId(int index) const;
117  #endif
118 
119  };
120 
121 }
122 #endif
virtual void loadSpeciesParam(Serializable::IArchive &ar)
Load species structure from an Archive.
Definition: Multiblock.cpp:102
virtual int calculateDihedralTypeId(int index) const
Return same dihedral type for any dihedral in any chain.
Definition: Multiblock.cpp:225
Multiblock()
Default constructor.
Definition: Multiblock.cpp:19
Classes used by all simpatico molecular simulations.
A linear MULTIBLOCK copolymer chain.
Definition: Multiblock.h:26
virtual void save(Serializable::OArchive &ar)
Save internal state to an archive.
Definition: Multiblock.cpp:169
Saving / output archive for binary ostream.
DArray< int > atomTypes_
Particle type ids for each block.
Definition: Multiblock.h:54
virtual void readSpeciesParam(std::istream &in)
Read block lengths length and and types.
Definition: Multiblock.cpp:35
Utility classes for scientific computation.
Definition: accumulators.mod:1
int nBlock_
Number of particles in each block.
Definition: Multiblock.h:48
DArray< int > blockLengths_
Number of particles in each block.
Definition: Multiblock.h:51
virtual int calculateAngleTypeId(int index) const
Return same angle type for any angle in any chain.
Definition: Multiblock.cpp:217
virtual int calculateBondTypeId(int index) const
Return same bond type for any bond in any chain.
Definition: Multiblock.cpp:210
virtual ~Multiblock()
Destructor.
Definition: Multiblock.h:35
Saving archive for binary istream.
A Species of linear polymers (abstract).
Definition: Linear.h:36
DArray< int > blockBegin_
Particle index for the beginning of each block.
Definition: Multiblock.h:57
virtual int calculateAtomTypeId(int index) const
Return the atom type for a specific atom.
Definition: Multiblock.cpp:193