8#include "BlockDescriptor.h"
45 vertexIds_[0] = vertexId0;
46 vertexIds_[1] = vertexId1;
65 { polymerType_ = type; }
72 in >> block.monomerId_;
74 if (block.polymerType_ == PolymerType::Branched) {
75 in >> block.vertexIds_[0];
76 in >> block.vertexIds_[1];
87 out <<
" " << block.monomerId_;
89 out.setf(std::ios::scientific);
93 if (block.polymerType_ == PolymerType::Branched) {
94 out <<
" " << block.vertexIds_[0];
95 out <<
" " << block.vertexIds_[1];
Description of a linear homopolymer block within a block polymer.
double length() const
Get the length (number of monomers) in this block.
void setId(int id)
Set the id for this block.
virtual ~BlockDescriptor()
Destructor.
int monomerId() const
Get the monomer type id.
void setPolymerType(PolymerType::Enum type)
Set the polymer type.
virtual void setLength(double length)
Set the length of this block.
void setVertexIds(int vertexAId, int vertexBId)
Set indices of associated vertices.
BlockDescriptor()
Constructor.
int id() const
Get the id of this block.
void setMonomerId(int monomerId)
Set the monomer id.
C++ namespace for polymer self-consistent field theory (PSCF).
std::istream & operator>>(std::istream &in, Pair< Data > &pair)
Input a Pair from an istream.
std::ostream & operator<<(std::ostream &out, const Pair< Data > &pair)
Output a Pair to an ostream, without line breaks.
Struct containing an enumeration of polymer structure types.