/*
 * Constructor.
 */
 McChemicalPotential::McChemicalPotential(McSystem& system)
  : SystemDiagnostic<McSystem>(system),
    systemPtr_(&system),
    simulationPtr_(&system.simulation()),
    boundaryPtr_(&system.boundary()),
    energyEnsemblePtr_(&system.energyEnsemble()),
    randomPtr_(&system.simulation().random()),
    outputFile_(),
    accumulator_(),
    nTrial_(-1),
    nMoleculeTrial_(-1),
    nSamplePerBlock_(1),
    isInitialized_(false)
 {}
   /* 
   * Constructor
   */
   EndSwapMove::EndSwapMove(McSystem& system) : 
      SystemMove(system),
      speciesId_(-1)
   {
      /* Preconditions:  
      * For now, Usage with angles and dihedrals is prohibited. This
      * move would work fine with homogeneous angles and dihedrals,
      * and could be modified to work with heterogeneous potentials,
      * but the required checks or modifications are not implemented.
      */
      #ifdef INTER_ANGLE
      if (system.hasAnglePotential()) {
         UTIL_THROW("CfbEndBase unusable with heterogeneous dihedrals");
      }
      #endif
      #ifdef INTER_DIHEDRAL
      if (system.hasDihedralPotential()) {
         UTIL_THROW("CfbEndBase unusable with heterogeneous dihedrals");
      }
      #endif

      setClassName("EndSwapMove"); 
   }
Beispiel #3
0
 /* 
 * Constructor.
 */
 CfbRebridgeBase::CfbRebridgeBase(McSystem& system) : 
    CfbEndBase(system),
    length21_(1.0),
    length10_(1.0),
    kappa10_(0.0)
 {
    // Preconditions
    #ifdef MCMD_NOMASKBONDED
    UTIL_THROW("CfbRebridgeBase is unusable ifdef MCMD_NOMASKBONDED");
    #endif
    #ifdef INTER_DIHEDRAL
    if (system.hasDihedralPotential()) {
       UTIL_THROW("CfbRebrigeBase is unusable with dihedrals");
    }
    #endif
 }