Giter Site home page Giter Site logo

surface_charging's Introduction

Surface_Charging

This is how you do a full surface charging calculation for studying electro-catalytic systems. Please feel free to add any thing else to this repository related to this method.

THEORY: Regular CHE approach : Under the CHE scheme, the chemical potential of an electron−proton pair can be approximated in reference to the free energy of half a dihydrogen molecule, and it also allows the effect of the applied potential and pH to be easily included in the model.

Surface charging: Under the CHE approach, the electrochemical potential is assumed to affect only the chemical potential of the exchanged electrons. Thus, electronic energy is independent with respect to the potential and is taken from neutral systems. However, the free energy for the sites and the intermediates in the "neutral" situation is not the same as the U = 0.0 V situation.

STEPS ( I take these steps to reduce the computational time for the calculation) :

  1. First perform a full relaxation calculation of your system, you can use ase_geometry_opt.py for it.

  2. Symmetrize your system using the Symmetrize_simple.py ( NOTE: you might have to edit the symm.py based on your system but this should work most of the times)

    -- You will have to change the part you want to keep fixed in the slab. This would usually be the middle part of the system.

  3. Run a relax + solvation calculation on the new system that you generated by the Symmetrize_simple.py this can be done with ase_symmetric_opt.py but change the parameters depending on the system.

    -- Use the "ase_symmetric_opt.py" file to run a relax(without LSOL) and then it will also create a folder for LSOL that will have the calcualtion with solvation

  4. Once the solvation relaxation is done we then move on to do surface charging calculatation. Follow the following steps:

    -- create a folder SC inside your LSOL folder.

    -- Copy the following files from the LSOL folder to SC folder : OUTCAR and CONTCAR

    -- change the file name of CONTCAR to POSCAR inside the SC folder.

    -- put the ase_surface_charging.py in the SC folder and change its name to ase-bfgs.py ( ase python file that will do the vasp calcualtion, so change any input parameters accoding to the system) and the submission script as job.sh ( The names are important to be kept as the same)

  5. Run the gen-scpot.py file inside the SC folder. This will create all the folders with different NELECT valules and also submit the calculation in each folder. You dont need to do anything else if your job.sh, ase-bfgs.py etc files are good .

  6. These calculations do take considerable time so it can be that you need to resubmit certain jobs in certain NELECT folder, you will have to do this step manually.

  7. Once the converage criteria is reached in each folder, run the plot_sc.py, this will give you the paprabolic equation and also give out certain plots. To visualize if your plots are fitting to the points , please visualize the g-pot.png file before using the papabola to use in further analysis. An example g-pot.png file has been provided for references.

REFERENCES:

surface_charging's People

Contributors

sim-kum avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

veritas496

surface_charging's Issues

issue when using gen-scpot.py

after putting all required files into sc folder, I tried to run this script to generate each charge folder. But I meet this error info

(base) [yaniguan@login1 sc]$ python gen-scpot.py 
{'nelect': 218.5}
Traceback (most recent call last):
  File "/u/scratch/y/yaniguan/amination/cu111/slab/2/lsol/sc/gen-scpot.py", line 102, in <module>
    scrun.setup()
  File "/u/scratch/y/yaniguan/amination/cu111/slab/2/lsol/sc/gen-scpot.py", line 80, in setup
    subprocess.call(['sbatch', 'ase.sh'])
  File "/u/home/y/yaniguan/miniconda3/lib/python3.9/subprocess.py", line 349, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/u/home/y/yaniguan/miniconda3/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/u/home/y/yaniguan/miniconda3/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'sbatch'

I guess this error info is due to this script is used in slurm cluster. I was confused how to fix this issue. I tried pbs keyword to replace sbatch since hoffman2 is a kind of PBS cluster, but it doesn't work.

Could you please help me fix this problem?
Thanks

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.