Skip to content

Code to generate randomised initial periodic molecular structure with 2 molecule types for MD simulations

Notifications You must be signed in to change notification settings

chopraanjali/RIMS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Randomised Initial Molecular System (RIMS)

To compile: g++ random_struc.cpp -o executable To run: ./executable

This code generates a periodic liquid structure in a box for Molecular Dynamics (MD) simulations. It is capable of generating a pure liquid (with only one type of molecule) OR a binary liquid with 2 molecule types. Params.txt file can be used to set various relevant parameters for generating the structure. Unit : Angstrom Ovito can be used to visualize the system generated by this code.

Params.txt

Quick help is also printed in the params.txt file. Here is a slightly detailed description of each parameter.

  1. density : This is the number density of the liquid sturcture and corresponds to the number of molecules per unit volume. E.g., if the box_dim is 10 Ang, and the number density is set to be 0.003 then a total of 3 molecules will be generated in the system. This is the total number of molecules (solvent + solute).
  2. percent_solute : percentage of final structure that should contain solute molecules. The number of molecules of solvent and solute in the final structure is based on this parameter.
  3. box_dim : The system creates a cube of side length specified here (in Angstroms).
  4. min_dist : This is the minimum distance between 2 molecules (float value).
  5. seed : This program uses a random number generator (RNG) and the seed for this RNG can be set from 0 to 4,294,967,295. This parameter is included for reproducibility of the initial structure.
  6. out_file : The name of the output file for the generated structure can be given here. Remember to give the name with the .xyz extension.
  7. dimensions : USE 3 for a 3d system
  8. inp_mols : This parameter is used to decide whether the system will be a pure liquid or binary (with solute molecules). It can be 1 or 2.
  9. solute_filename : Provide the generator with a solute molecule in .xyz format
  10. solvent_filename : Provide the generator with a solvent molecule in .xyz format

random_struc.cpp

Main code to generate the specified molecular system

CNT.cpp

Generates Carbon Nanotubes (CNT) for a given diameter and length

Releases

No releases published

Packages

No packages published

Languages