cpmd_scritps

This directory contains python scripts that can be used to setup or analyze CPMD calculations.

cell_size

Determine an estimate for cell size of a CPMD calculation.

Two options are available:
Reading from xyz format or reading from gromos format.

usage:

python cell_size.py myfile.xyz

In the case of gromos format, a list of the names of the residues in the QM region has to be given (when asked by the script).

The xyz coordinates can be in Aangstroms or in Bohrs.

vmd_plot_cube

Load orbital .cube files in VMD and exports them to .png format.

Usage example:

python vmd_plot_cube.py WAVEFUNCTION.1.pdb -c WAVEFUNCTION.*.cube

Requirements:

  • The VMD package should be available by just writting vmd in the terminal.
  • The conversion from .tga to .png requires the Imagemagick convert utility.

This script has been written by learning and stilling from other scripts:

create_scripts(cube_files)[source]

get_cp_group

Determine optimal CP_GROUP value for CPMD MPI calculations.

This is based on empirical investigation and is not guarented to give optimal performance at all!

The attempt here is:

  • to have a uniform distribution of plane waves on all CP groups.
  • to minimize CP_GROUP with that constraint, where CP_GROUP is the number of MPI tasks per CP_GROUP, i.e. CP_GROUP size.
  • to make the number of MPI tasks a multiple of the number of CPUs on a node.

cpmd_spec

Simple script to plot absorption spectra from CPMD TDDFT output files.

Usage:

python cpmd_spec.py cpmd1.out cpmd2.out ...

Where cpmdx.out denote a CPMD output file for a TDDFT calculation. At least one output file should be given.

read_orbs_info

Read CPMD TDDFT output file and extract informations about the orbitals involved in the electronic transitions.

A CPMD input string is printed which will enable to generate grid files to plot all the orbital involved in the electronic transitions.

get_orbital_energies(lines)[source]
get_transition_orbitals(lines)[source]