|
SSAGES
0.1
A MetaDynamics Package
|
ForwardFlux sampling method. More...
#include <DirectForwardFlux.h>

Public Member Functions | |
| DirectForwardFlux (const MPI_Comm &world, const MPI_Comm &comm, double ninterfaces, std::vector< double > interfaces, unsigned int N0Target, std::vector< unsigned int > M, bool initialFluxFlag, bool saveTrajectories, unsigned int currentInterface, std::string output_directory, unsigned int frequency) | |
| Constructor. More... | |
| void | PostIntegration (Snapshot *snapshot, const class CVManager &cvmanager) override |
| Post-integration hook. More... | |
Public Member Functions inherited from SSAGES::ForwardFlux | |
| ForwardFlux (const MPI_Comm &world, const MPI_Comm &comm, double ninterfaces, std::vector< double > interfaces, unsigned int N0Target, std::vector< unsigned int > M, bool initialFluxFlag, bool saveTrajectories, unsigned int currentInterface, std::string output_directory, unsigned int frequency) | |
| Constructor. More... | |
| void | PreSimulation (Snapshot *snapshot, const class CVManager &cvmanager) override |
| Pre-simulation hook. More... | |
| void | PostSimulation (Snapshot *snapshot, const class CVManager &cvmanager) override |
| Post-simulation hook. More... | |
Public Member Functions inherited from SSAGES::Method | |
| Method (uint frequency, const MPI_Comm &world, const MPI_Comm &comm) | |
| Constructor. More... | |
| void | SetCVMask (const std::vector< uint > &mask) |
| Sets the collective variable mask. | |
| virtual | ~Method () |
| Destructor. | |
Public Member Functions inherited from SSAGES::EventListener | |
| EventListener (uint frequency) | |
| Constructor. More... | |
| uint | GetFrequency () const |
| Get frequency of event listener. More... | |
| virtual | ~EventListener () |
| Destructor. | |
Static Public Member Functions | |
| static DirectForwardFlux * | Build (const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path) |
Static Public Member Functions inherited from SSAGES::ForwardFlux | |
| static ForwardFlux * | Build (const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path) |
Static Public Member Functions inherited from SSAGES::Method | |
| static Method * | BuildMethod (const Json::Value &json, const MPI_Comm &world, const MPI_Comm &comm, const std::string &path) |
| Build a derived method from JSON node. More... | |
Protected Member Functions | |
| void | CheckForInterfaceCrossings (Snapshot *, const class CVManager &) override |
| Function that checks if interfaces have been crossed (different for each FFS flavor) More... | |
| void | InitializeQueue (Snapshot *, const CVList &) override |
| Initialize the Queue. | |
Protected Member Functions inherited from SSAGES::ForwardFlux | |
| void | CheckInitialStructure (const CVList &) |
| Function that checks the initial structure that user provides. | |
| void | WriteInitialFlux () |
| Function to compute and write the initial flux. | |
| void | AddNewIDsToQueue () |
| bool | HasReturnedToA (double) |
| Function checks if configuration has returned to A. | |
| int | HasCrossedInterface (double, double, unsigned int interface) |
| Function checks if configuration has crossed interface specified since the last check. More... | |
| void | WriteFFSConfiguration (Snapshot *snapshot, FFSConfigID &ffsconfig, bool wassuccess) |
| Write a file corresponding to FFSConfigID from current snapshot. | |
| void | ReadFFSConfiguration (Snapshot *, FFSConfigID &, bool) |
| Read a file corresponding to a FFSConfigID into current snapshot. | |
| void | ComputeInitialFlux (Snapshot *, const CVList &) |
| Compute Initial Flux. | |
| void | ComputeTransitionProbabilities () |
| Compute the probability of going from each lambda_i to lambda_{i+1}. More... | |
| void | PrintQueue () |
| Print the queue, useful for debugging. | |
| void | PopQueueMPI (Snapshot *, const CVList &, unsigned) |
| Pop the queue, do MPI so that all procs maintain the same queue. | |
| void | FluxBruteForce (Snapshot *, const CVList &) |
| Compute the flux via brute force. More... | |
| void | ReconstructTrajectories (Snapshot *) |
| When simulation is finished, parse through the trajectories that reached B, and reconstruct the complete trajectory from where it started at A (lambda0) | |
| void | ComputeCommittorProbability (Snapshot *) |
| When simulation is finished, recursively parse through the trajectories that reached B or failed back to A and calculate the Commitor Probability of that state going to B (_pB) | |
| void | AppendTrajectoryFile (Snapshot *, std::ofstream &) |
| void | OpenTrajectoryFile (std::ofstream &) |
| Take the current config in snapshot and append it to the provided ofstream. | |
Additional Inherited Members | |
Protected Attributes inherited from SSAGES::ForwardFlux | |
| double | _ninterfaces |
| std::vector< double > | _interfaces |
| FFS Interfaces. | |
| bool | _interfaces_increase |
| Interfaces must monotonically increase (or decrease), this determines whether going to the 'next' interface will be higher values of CV, or lower ones. | |
| double | _cvvalue_previous |
| Previous cv position, used to determine if you've crossed an interface since last time. | |
| double | _cvvalue |
| current cv position | |
| double | _rate |
| rate constant | |
| std::vector< FFSConfigID > | Lambda0ConfigLibrary |
| Data structure that holds a Library N0 configurations at lambda0. | |
| double | _N0TotalSimTime |
| Total Simulation Time spent in accumulating \ _N0. | |
| unsigned int | _N0Target |
| Number of configurations to store at lambda0, target. | |
| double | _fluxA0 |
| Flux of trajectories out of state A. Denoted PhiA0 over h_A in Allen2009. | |
| std::vector< unsigned int > | _M |
| std::vector< unsigned int > | _A |
| Number of attempts from interface i. | |
| std::vector< double > | _P |
| Flag to determine wheter fluxA0 should be calculated, seems not using this. More... | |
| std::vector< unsigned int > | _S |
| std::vector< unsigned int > | _N |
| bool | _pop_tried_but_empty_queue |
| bool | _initialFluxFlag |
| if 1 compute initial flux | |
| bool | initializeQueueFlag |
| FFSConfigID | myFFSConfigID |
| The current FFSConfigID of this MPI process. | |
| bool | _saveTrajectories |
| should the FFS trajectories be saved | |
| unsigned int | _nfailure_total |
| std::vector< std::vector < double > > | _pB |
| unsigned int | _current_interface |
| Current Interface. | |
| std::default_random_engine | _generator |
| random number generator | |
| std::deque< FFSConfigID > | FFSConfigIDQueue |
| std::string | _output_directory |
| Directory of FFS output. | |
| std::ofstream | _trajectory_file |
| file to which the current trajectory is written to | |
| uint | iteration_ |
| Method iteration counter/. | |
Protected Attributes inherited from SSAGES::Method | |
| mxx::comm | world_ |
| Global MPI communicator. | |
| mxx::comm | comm_ |
| Local MPI communicator. | |
| std::vector< uint > | cvmask_ |
| Mask which identifies which CVs to act on. | |
ForwardFlux sampling method.
The notation used here is drawn largely from Allen, Valeriani and Rein ten Wolde. J. Phys.: Condens. Matter (2009) 21:463102. We recommend referring to this review if the reader is unfamiliar with the method, or our variable naming conventions.
Definition at line 35 of file DirectForwardFlux.h.
|
inline |
Constructor.
| world | MPI global communicator. |
| comm | MPI local communicator. |
| frequency | Frequency with which this method is invoked. |
Create instance of Forward Flux
Definition at line 65 of file DirectForwardFlux.h.
|
static |
|
overrideprotectedvirtual |
Function that checks if interfaces have been crossed (different for each FFS flavor)
Number of trials to attemt from each interface Note _M[0] sets the number of 'branches' for RBFFS and BGFFS?
Implements SSAGES::ForwardFlux.
Definition at line 67 of file DirectForwardFlux.cpp.
References SSAGES::ForwardFlux::_A, SSAGES::ForwardFlux::_current_interface, SSAGES::ForwardFlux::_cvvalue, SSAGES::ForwardFlux::_cvvalue_previous, SSAGES::ForwardFlux::_generator, SSAGES::ForwardFlux::_interfaces, SSAGES::ForwardFlux::_M, SSAGES::ForwardFlux::_N, SSAGES::ForwardFlux::_nfailure_total, SSAGES::ForwardFlux::_ninterfaces, SSAGES::ForwardFlux::_P, SSAGES::ForwardFlux::_pop_tried_but_empty_queue, SSAGES::ForwardFlux::_S, SSAGES::ForwardFlux::_saveTrajectories, SSAGES::ForwardFlux::_trajectory_file, SSAGES::ForwardFlux::FFSConfigID::a, SSAGES::ForwardFlux::AppendTrajectoryFile(), SSAGES::Method::cvmask_, SSAGES::ForwardFlux::FFSConfigIDQueue, SSAGES::CVManager::GetCVs(), SSAGES::ForwardFlux::HasCrossedInterface(), SSAGES::ForwardFlux::HasReturnedToA(), SSAGES::ForwardFlux::iteration_, SSAGES::ForwardFlux::FFSConfigID::l, SSAGES::ForwardFlux::myFFSConfigID, SSAGES::ForwardFlux::FFSConfigID::n, SSAGES::ForwardFlux::PopQueueMPI(), SSAGES::ForwardFlux::PostSimulation(), SSAGES::Method::world_, and SSAGES::ForwardFlux::WriteFFSConfiguration().
Referenced by PostIntegration().


|
overridevirtual |
Post-integration hook.
| snapshot | Current simulation snapshot. |
| cvmanager | Collective variable manager. |
Implements SSAGES::ForwardFlux.
Definition at line 32 of file DirectForwardFlux.cpp.
References SSAGES::ForwardFlux::_initialFluxFlag, CheckForInterfaceCrossings(), SSAGES::ForwardFlux::CheckInitialStructure(), SSAGES::ForwardFlux::ComputeInitialFlux(), SSAGES::Method::cvmask_, SSAGES::CVManager::GetCVs(), InitializeQueue(), SSAGES::ForwardFlux::iteration_, and SSAGES::ForwardFlux::PrintQueue().

1.8.7