metadynamics
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
LamellarOrderParameter Class Reference

Detailed Description

Collective variable for studying phase transitions in block copolymer systems.

This class implements a collective variable based on the Fourier modes of concentration fluctuations.

The value of the collective variable $ s $ is given by $ s = \sum_{i = 1}^n \sum_{j = 1}^N a(type_j \cos(\mathbf{q}_i\mathbf{r_j} + \phi_i)) $, where $n$ is the number of modes supplied, $ \mathbf{q}_i = 2 \pi (n_{i,x}/L_x, n_{i,y}/L_y, n_{i,z}/L_z) $ is the wave vector associated with mode $i$, $\phi_i$ its phase shift, and $a(type_j)$ is the mode coefficient for a particle of type $type$.

The force is calculated as minus the derivative of $s$ with respect to particle positions $\mathbf{r}_j$, multiplied by the bias factor.

Inheritance diagram for LamellarOrderParameter:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 LamellarOrderParameter (boost::shared_ptr< SystemDefinition > sysdef, const std::vector< Scalar > &mode, const std::vector< int3 > &lattice_vectors, const std::vector< Scalar > &phases, const std::string &suffix="")
virtual void computeForces (unsigned int timestep)
std::vector< std::string > getProvidedLogQuantities ()
Scalar getLogValue (const std::string &quantity, unsigned int timestep)
Scalar getCurrentValue (unsigned int timestep)
- Public Member Functions inherited from CollectiveVariable
 CollectiveVariable (boost::shared_ptr< SystemDefinition > sysdef, const std::string &name)
virtual void setBiasFactor (Scalar bias)
std::string getName ()

Protected Member Functions

void calculateWaveVectors ()
 Helper function to update the wave vectors.

Protected Attributes

std::string m_log_name
 The log name for this collective variable.
std::vector< int3 > m_lattice_vectors
 Stores the list of miller indices.
std::vector< Scalar > m_mode
 Stores the per-type mode coefficients.
Scalar m_sum
 The current value of the collective variable.
GPUArray< Scalar3 > m_wave_vectors
 GPUArray of wave vectors.
GPUArray< Scalar2 > m_fourier_modes
 Fourier modes.
GPUArray< Scalar > m_phases
 Phase shifts.
- Protected Attributes inherited from CollectiveVariable
Scalar m_bias
std::string m_cv_name

Private Member Functions

void calculateFourierModes ()
 Helper function to calculate the Fourier modes.

Constructor & Destructor Documentation

LamellarOrderParameter ( boost::shared_ptr< SystemDefinition >  sysdef,
const std::vector< Scalar > &  mode,
const std::vector< int3 > &  lattice_vectors,
const std::vector< Scalar > &  phases,
const std::string &  suffix = "" 
)

Constructs the collective variable

Parameters:
sysdefThe system definition
modeThe per-type coefficients of the Fourier mode
lattice_vectorsThe Miller indices of the mode vector
phasesThe phases for every mode
suffixThe suffix appended to the log name for this quantity

Member Function Documentation

void calculateFourierModes ( )
private

Helper function to calculate the Fourier modes.

Returns a list of fourier modes (for all wave vectors)

void calculateWaveVectors ( )
protected

Helper function to update the wave vectors.

Calculate wave vectors.

void computeForces ( unsigned int  timestep)
virtual

Compute the forces for this collective variable. The force that is written to the force arrays must be multiplied by the bias factor.

Parameters:
timestepThe current value of the time step

Implements CollectiveVariable.

Scalar getCurrentValue ( unsigned int  timestep)
inlinevirtual

Returns the current value of the collective variable

Parameters:
timestepThe current value of the time step

Implements CollectiveVariable.

Scalar getLogValue ( const std::string &  quantity,
unsigned int  timestep 
)

Returns the value of a specific log quantity.

Parameters:
quantityThe name of the quantity to return the value of
timestepThe current value of the time step
std::vector<std::string> getProvidedLogQuantities ( )
inline

Returns the names of provided log quantities.


The documentation for this class was generated from the following files: