Skip to content

About

This repository contains the London Dispersion Density (LDD) Suite, which is used to compute the atomic contributions to London dispersion energy.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

45 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Header

London Dispersion Density (LDD) Suite

Github X (formerly Twitter) Follow Website Python 3.x License: LGPL v3

The LDD suite computes atomic contributions to the London dispersion energy and the dispersion density. It is based on the Atomic Decomposition of London Dispersion energy (ADLD) method and includes the following tools:

  • lddensity.py – computes atomic dispersion contributions using the selected Grimme's dispersion correction and generates a .cube file with the London dispersion density function.
  • PubQualityVMD.tcl – VMD script to automatically set visualization parameters for publication-quality images.

Table of contents

Tools Description

lddensity.py

Python script to compute atomic contributions to the London dispersion energy and the London dispersion density function using D3 or D4 corrections.

  • Input:
    • {basename}.xyz : a classic .xyz file containing atomic coordinates of the system in ångström.
  • Output:
    • .d3atomwise.txt or .d4atomwise.txt : a file containing atomic coordinates of the system with an additional column indicating each atom contribution to the London dispersion energy.
    • .d3out.txt or .d4out.txt : the original output generated by Grimme's DFT-D3 or DFT-D4 executable, respectively.
    • .d3omega.cube or .d4omega.cube : a .cube file that stores volumetric data of the LDD function, which can be used to easily visualize atomic contributions to London dispersion.

Note

If atomic contributions are computed or if you want to plot the dispersion density difference between two molecular systems, you can use the script solely to generate the .cube file.
In the latter case, first compute the atomic contributions for both systems, then build a new {basename}.atomwise.txt file containing the difference of the atomic contributions between the two structures.
See Generate Only the Cube File for more information.

PubQualityVMD.tcl

Script designed to visualize LD density function from a .cube file, adjusting VMD settings to generate publication-quality images.

Requirements

  • Python 3.x with standard libraries.
  • For lddensity.py, ensure that .xyz file and the respective DFT-D3 or DFT-D4 executable are in the current path. The executable can be downloaded from the official website.
  • For London dispersion density difference ensure {basename}.atomwise.txt is in the current path. See Dispersion Density Difference section for more information.
  • VMD must be installed for running PubQualityVMD.tcl (download).

Usage

lddensity.py

  1. Ensure {basename}.xyz file is at the current path.

  2. Run the script:

    python3 lddensity.py <basename> [-h] [--d {3,4}] [--npoints NPOINTS] [--func FUNC] [--damp DAMP] [--nprocs NPROCS] [--charge CHARGE]
                     [--s9 S9] [--onlycube]

PubQualityVMD.tcl

  1. Ensure the input .cube file you want to visualize is correctly named and located within an accessible directory (it's recommended to work within a single directory).

  2. Edit the script with your favorite text editor to include the path name in set file_name command.

  3. Run the script with the following command:

    vmd -e PubQualityVMD.tcl

Note

When a .cube file is loaded, if the {basename}.atomwise.txt file is present in the same folder, you can use the pick feature in VMD (Mouse > Pick) to visualize the dispersion energy of individual atoms upon selection. Some functions within the script are commented out by default for safety. However, if you are interested in exploring or utilizing these functions, you can easily uncomment them.
Auto color scaling is enabled by default.
Auto rendering is disabled by default. Set render_mode to 1 to enable it (ImageMagick is required).

Tip

Change the rotation angles (rot_x, rot_y, rot_z) and the moleculare size (scale_val) to display the molecule according to your preference. For better visualization, set autoscale to 1 and choose symmetric values for colorscale_min and colorscale_max.

Arguments Description

Below is a detailed table of the arguments that can be used with our script. Each entry provides you with the name of the argument, a brief description, information on whether the argument is optional, and the default value it takes if not specified by the user. This table is designed to help you quickly understand how to configure the script to meet your specific requirements.

Argument Description Optional Default Value
basename The base name for the input .xyz file. No None
d Specifies the D correction (D3 or D4) Yes 4
npoints Specifies the number of grid points for each dimension in the density calculation. Yes 80
func Defines the functional to be used in the calculation. Refer to DFT-D3/DFT-D4 manual for all available functionals. Yes b3-lyp
damp Specifies the damping function to be used in the D3 calculation, refer to DT-D3 manual for all available damping functions. Yes bj
charge Sets the overall charge of the molecule being analyzed in the D4 calculation. Yes 0
s9 A coefficient that scale the ATM (Axilrod-Teller-Muto) term for three-body dispersion in the D4 calculation. Allows users to adjust the contribution of three-body interactions in the dispersion energy. Set to 0 to eliminate this contribution or 1 to include three-body Yes 0
nprocs Determines the number of processors used for parallel computation. Yes 1
onlycube Generates only the .cube file. See Generate Only the Cube File section Yes False

Generate Only the Cube File

If you have already computed the atomic contributions (for example using another software), or if you want to plot the dispersion density difference function, you can use the --onlycube flag in lddensity.py.

In this case, the input file is not a standard .xyz, but rather an .xyz file with an extra column containing the atomic dispersion contributions in kcal/mol.
The file must be named {basename}.atomwise.txt, which corresponds to the file produced by the script when the --onlycube flag is not used.

An example of .atomwise.txt file for the $C_6H_6–Li$ system is:

#
atom   x(Å)         y(Å)        z(Å)        Edisp(kcal/mol)
C      -2.378672     1.005050   -0.079453   -2.128400
C      -2.318663    -0.385217   -0.085888   -2.128400
C      -1.085955    -1.028059   -0.147588   -2.128400
C       0.086589    -0.280636   -0.203051   -2.128300
C       0.026549     1.109641   -0.196866   -2.127300
C      -1.206135     1.752463   -0.134993   -2.127300
H      -3.337288     1.505059   -0.038209   -0.486950
H      -3.230736    -0.966137   -0.050005   -0.487450
H       0.937922     1.690612   -0.246784   -0.486450
H      -1.253275     2.833395   -0.136867   -0.486550
H      -1.039495    -2.108952   -0.159689   -0.487350
H       1.044500    -0.780664   -0.258085   -0.486850
Li     -1.018560     0.350445    2.545363   -3.707400

Dispersion Density Difference

To generate the dispersion density difference between two molecular systems:

  1. Compute the atomic dispersion contributions for both systems separately.
  2. Be sure there's an atom-to-atom mapping between the two structures.
  3. Build a new {basename}.atomwise.txt file where the atomic dispersion contribution for each atom corresponds to the difference between its values in the two systems.
  4. Use this difference file as input to generate the .cube file with --onlycube.

This procedure allows you to visualize the difference between atomic LD contributions for two different molecular structures (e.g., a pair of structures along a reaction profile).

An example command could be:

python3 lddensity.py system_diff --onlycube --npoints 80 --nprocs 2

Renderings

The image below is a rendering generated with PubQualityVMD.tcl for a $C_6H_6–Li$ system. Red/blu color indicates high/low atomic dispersion contribution.

London dispersion density for Benzene-Lithium

Credits

If you use the LDD suite in your research or any publication, please cite:

License

Distributed under GNU Lesser General Public License with restrictions. See LICENSE for more information.

Contacts

For general inquiries, feedback, or assistance with using the LDD suite, please contact us at:

Gianluca Regni - gianluca.regni@dottorandi.unipg.it
Lorenzo Baldinelli - lorenzo.baldinelli@dottorandi.unipg.it
Giovanni Bistoni - giovanni.bistoni@unipg.it

About

This repository contains the London Dispersion Density (LDD) Suite, which is used to compute the atomic contributions to London dispersion energy.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages