Git Product home page Git Product logo

moga-nsga3's Introduction

MOGA-NSGA3

This software uses 3rd generation non-dominated search based genetic algorithm go train Stillinger-Weber forcefield for thermal conducitivity simulations. For details related to using the software please follow the instructions below

USAGE:

Step 1: Provide data for running the force field fitting

  1. Put reference band structure data in UTIL folder as done in this repo.
  2. Put cell data corresponding to different states as cell1, cell2, cell3
  3. Put the template forcefield which you wish to train

Step 2: Compile the nsga3 and workflow code:

  1. Go into src/ directory: cd src/
  2. Modify the following lines in moga.c:

int iteration_num = 500; // number of training iterations

int population_num = 300; // population size for ga.in training

to the total number of epochs and total population size required for the training

For example: If the total number of epochs is 300 and population size is 200 then modify as follows:

int iteration_num = 300; // number of training iterations

int population_num = 200; // population size for ga.in training

Once these modifications are done compile the code by running Makefile

make

Step 3: Modify var.in to specify all the input parameters

The structure of var.in is as follows:

300 # Size of the population (same as population_num in moga.c)
14 # Total number of variables in the force field file that need modification
5 # Total number of objectives
0.8 # Cross-Over Probability
0.2 # Mutation Probability
1.0 # Degree of Mutation between [0-1]
10 # Total number of divisions (will be read from hyperplane.in file, any value here will be ignored)
2.2 5.5 2.8 1.3 0.4 0.24 30.0 10.7 27.0 50.70 15.00 1.60 4.50 74.0 # Lower bound of variables
2.4 5.9 3.0 2.0 0.7 0.38 45.2 16.1 40.7 76.20 23.00 2.41 6.80 85.0 # Upper bound of variables

Please modify each line with suitable values consistent with the comments corresponding each line

Step 4: Create hyperplane.in file for reference point computation required by NSGA3 algorithm

This can be done by running this code within matlab environment by calling the function
GenerateReferencePoints(M,p)
M = Total number of Objectives
p = Total number of divisions

This step generates hyperplane.in with appropriate number of reference points

Step 5: Running the code

For running the worflow make sure to clean up the workspace first by running
sh cleanup.sh ${PopulationNumber}

Then run the following command for tuning the force field parameters:

mpirun -n ${PopulationNumber} ./moga | tee log

This step runs moga workflow on ${PopulationNumber} parallel threads, each performing its own calculation independently and writes the output to log

Example : Forcefields for MoSe2 monolayers

The files for this calculation are provided in the Example folder and follow the strategy as mentioned in the paper

Computed error in specified objectives

Figure: (a) error in lattice constant, (b) error in elastic modulus and (c) error in phonon dispersion curves

moga-nsga3's People

Contributors

ankitmish avatar

Watchers

 avatar  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.