Giter Club home page Giter Club logo

wtmd_lfts_cpu's Introduction

wtmd_lfts_cpu

Well-tempered metadynamics applied to Langevin field-theoretic simulations of diblock copolymers on CPUs

See https://www.tbeardsley.com/projects/lfts/wtmd for a detailed discussion of this project.

comp.sh:
An example compile script

Running the program:
./<program_name> <lfts_input_file_name> <bias_input_file_name>
Note: Two input files are required. The first specifies the standard parameters and input fields for a Langevin field-theoretic simulation (L-FTS). The second specifies parameters and input potentials related specifically to performing well-tempered metadynamics (WTMD).

"input":
An example L-FTS input file.

L-FTS Input file format:
Line 1: N NA XN C Ndt isXeN
Line 2: mx my mz Lx Ly Lz
Line 3: n_eq n_st n_smpl loadType
Lines 4->(M+3): W-(r)
Lines (M+4)->(2M+3): w+(r)

Note: A real-space position r = (x,y,z) corresponds to a mesh point position r_m = (i,j,k), where i=0->mx-1, j=0->my-1 and k=0->mz-1 are integers. The elements of the fields, W-(r) and w+(r), are then written in ascending order of the row-major index: p = mx*(i*my+j)+k.

L-FTS parameter descriptions:
N is the number of monomers in a single polymer chain (integer).
NA is the number of monomers in the A-block of a polymer chain (integer).
XN is the interaction strength between A and B-type monomers (double).
C is the square root of the invariant polymerisation index, Nbar (double).
Ndt is the size of the time step in the Langevin update of W-(r) (double).
isXeN instructs the program whether the parameter XN is in terms of bare (isXeN=0) or effective (isXeN=1) chi (integer).
mx, my, mz are the number of mesh points in the x, y, and z dimensions of the simulation box (integers).
Lx, Ly, Lz are the dimensions of the simulation box (in units of the polymer end-to-end length, R0) in the x, y, and z dimensions (doubles).
n_eq is the number of langevin steps performed to equilibrate the system (integer).
n_st is the number of langevin steps performed after equilibration has ended, during which statistics are sampled (integer).
n_smpl is the number of steps between samples being taken in the statistics period (integer).
loadType instructs the program whether to load the W-(r) and w+(r) fields from the proceeding file lines (loadType=1), start from a disordered state (loadType=0) or start from a (300) lamellar phase (loadType=2).

M = (mx*my*mz) is the total number of mesh points, such that the proceeding 2*M lines of the file can hold W-(r) and w+(r) fields to load.

"bias_in":
An example WTMD input file.

WTMD Input file format:
Line 1: ell kc sigma_Psi DT Psi_min mPsi dPsi update_freq read_bias
Lines 2->(mPsi+1): Psi u(Psi) up(Psi) I0(Psi) I1(Psi)

WTMD parameter descriptions:
ell is the constant, l, used in the definition of the order parameter (double).
kc is the wavevector cutoff (constant) in order parameter (double).
sigma_Psi is the width of Gaussians added to the bias potential (double).
DT controls the rate at which the amplitude of Guassians is reduced (double).
Psi_min is the lowest value of Psi for which the bias potential is collected (double).
mPsi is the total number of mesh points covering the range of Psi being investigated (integer).
dPsi is the distance between adjacent mesh points in Psi (double).
update_freq is the number of Langevin steps between updates of the bias potential (integer).
read_bias is a flag indicating whether an initial bias potential should be read from file (read_bias=1) or not (read_bias=0) (integer).

Lines 2->(mPsi+1) are only read if read_bias=1, otherwise the bias potential starts with all elements equal to zero.

Output files:
"w_eq_<step_number>": The state of the W-(r) and w+(r) fields at simulation step number <step_number> during the equilibration period. First three lines are simulation parameters so it can be used as an input file.
"w_st_<step_number>": The state of the W-(r) and w+(r) fields at simulation step number <step_number> during the statistics gathering period. First three lines are simulation parameters so it can be used as an input file.
"phi_eq_<step_number>": The state of the phi-(r) and phi+(r) fields at simulation step number <step_number> during the equilibration period.
"phi_eq_<step_number>": The state of the phi-(r) and phi+(r) fields at simulation step number <step_number> during the statistics gathering period.
"bias_st_<step_number>": Output file in the same format as the WTMD input file, containing the current state of the bias potential after step_number Langevin steps in the statistics gathering phase.

wtmd_lfts_cpu's People

Contributors

tmbeardsley avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.