Code Monkey home page Code Monkey logo

egulp's Introduction

eGULP

Efficient Qeq algorithm for periodic systems. Original method by Rappé et al.

Credit to Kadantsev et al.

Installation

Prerequisites:

  • C compiler (either icc or gcc)
  • GNU scientific library (GSL) for ubuntu: sudo apt-get install libgsl0-dev for macos: sudo port install gsl
cd src
# edit Makefile to select compiler (gcc.arch or intel.arch)
make

Usage

egulp HKUST.cif GMP.param configure.input

prints files charge.cif,charge.dat,charge.xyz and energy.dat.

  • Consider using one of the following parameters:

    1. GMP.param (from UFF as implemented in Openbabel)
    2. MEPO.param from Kadantsev et al.
    3. GULP.param same as GMP except for Cu and Ce
  • This version of the code allows reading cif files and printig charge.cif, but please consider that the parsing of the cif file is done in the following way (and therefore not all cif files are compatible):

    1. it reads cell info from _cell_length_a, _b, _c, _cell_angle_alpha, _beta, _gamma
    2. only P1 symmetry is compatible
    3. only fractional coordinates of atoms are compatible
    4. it starts to read the atoms from the first line after _atom_site_fract_x that does not contains "_atom_site"
    5. for each atom line in the cif file, it reads:
    column read
    1 ignored
    2 atom name
    3 x fractional coordinate
    4 y fractional coordinate
    5 z fractional coordinate
    6+ if present, ignored
  • File configure.input allows to specify extra settings:

build_grid 0
build_grid_from_scratch 1 none 0.25 0.25 0.25 1.0 2.0 0 0.3
save_grid 0 grid.cube
calculate_pot_diff 0
calculate_pot 0 repeat.cube
skip_everything 0
point_charges_present 0
include_pceq 0
imethod 0

which stand for:

build_grid ............ {bool}
build_grid_from_scratch {bool}
                        {grid_input name}
                        {dx, dy and dz grid spacing}
                        {vdw_min vdw_max}
                        {bool, consider only gridpoint between vdw_min and vdw_max}
save_grid ............. {bool}
                        {cube filename}
calculate_pot_diff .... {bool}
calculate_pot ......... {0:False, 1: Input pot, 2: output pot}
                        {cube filename}
skip_everything ....... {bool, to skip charge and pot calculation}
point_charges_present . {bool, to start the method from initial charges}
include_pceq .......... {bool}
imethod ............... {0: Qeq, 1: SPLIT-Qeq}

Development

Before making changes to the code, please install the pre-commit hooks (for automatic code formatting and linting):

pip install pre-commit
pre-commit install

egulp's People

Contributors

danieleongari avatar ltalirz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ltalirz ezpzbz

egulp's Issues

Newer version failing to compile on deneb

$ module load intel
$ make
gcc -I/opt/local/include  egulp.o geometry.o scf.o utilsa.o genpot.o interact.o param.o vdw.o grid.o cell.o econfig.o pcharge.o eseqparam.o psinv.o elements.o `pkg-config --cflags --libs gsl` -o egulp
egulp.o:(.data+0x0): undefined reference to `__must_be_linked_with_icc_or_xild'
scf.o:(.data+0x0): undefined reference to `__must_be_linked_with_icc_or_xild'
utilsa.o:(.data+0x0): undefined reference to `__must_be_linked_with_icc_or_xild'
genpot.o:(.data+0x0): undefined reference to `__must_be_linked_with_icc_or_xild'
interact.o:(.data+0x0): undefined reference to `__must_be_linked_with_icc_or_xild'
param.o:(.data+0x0): more undefined references to `__must_be_linked_with_icc_or_xild' follow
collect2: error: ld returned 1 exit status
make: *** [egulp] Error 1

I'm still using for the moment the executable aiida-codes/egulp_deneb that was (presumably) compiled from a previous version.

@ltalirz can you please give a look to your latest modifications? Or maybe this is due to some changes on the intel module on the cluster.

Cif parser failing if there are blank lines

If there is a blank line (instead of an empty line with a space), the cif parser InitGeometry() fails.

This made fail some COFs that were generated with a newer version of manage_crystal.

Parsing failure if missing charge column

If the _atom_site_charge column is missing from the CIF, the program fails with the error:

egulp version 2.0.2
number of command line parameters is 4
input parameters are assumed in order
egulp <geometry> <parameters> <configure>
opening geometry file HKUST1.cif
geometry file HKUST1.cif is open
Lattice lenghts: A 26.3430000 B 26.3430000 C 26.3430000
Lattice angles: alpha 90.0000000 beta 90.0000000 gamma 90.0000000
Lattice vector #1 26.3430000  0.0000000  0.0000000
Lattice vector #2  0.0000000 26.3430000  0.0000000
Lattice vector #3  0.0000000  0.0000000 26.3430000
unit cell volume is 18280.8209756
Number of atoms is 624
Arrays for atoms allocated
Rewind file HKUST1.cif to read the atoms after line: _atom_site_fract_z

Reading atoms
[1]    1384 segmentation fault (core dumped)  ../../egulp HKUST1.cif GMP.param configure.input

Note that I changed manage_crystal default settings not to print the charges column if all charges are zero, which is the reason why this failure was not relevant before.

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.