Plotting a projected bandstructureΒΆ

First, we can run the calculation outlined in Example 2 of the run3 tutorial; if you have already performed this calculation then the following cell will do very little.

[8]:
!run3 -v 2 LiCoO2
2018-11-08 17:52:17,832 -     INFO: Initialising FullRelaxer object for LiCoO2-CollCode29225
2018-11-08 17:52:17,832 -     INFO: Calling CASTEP on LiCoO2-CollCode29225
2018-11-08 17:52:17,832 -     INFO: Testing executable castep.
2018-11-08 17:52:17,838 -     INFO: Using default MPI library.
2018-11-08 17:52:17,839 -     INFO: Detected default MPI.
2018-11-08 17:52:17,881 -  WARNING: MPI library tried to use too many cores and failed, rescaling core count and re-running with 4 cores...
2018-11-08 17:52:17,881 -  WARNING: stdout:
2018-11-08 17:52:17,881 -  WARNING: sterr: --------------------------------------------------------------------------
There are not enough slots available in the system to satisfy the 8 slots
that were requested by the application:
  castep

Either request fewer slots for your application, or make more slots available
for use.
--------------------------------------------------------------------------

2018-11-08 17:52:17,881 -     INFO: Testing executable castep.
2018-11-08 17:52:17,991 -     INFO: Performing Workflow of type CastepSpectralWorkflow on LiCoO2-CollCode29225
2018-11-08 17:52:17,991 -     INFO: Getting seekpath cell and kpoint path.
2018-11-08 17:52:18,053 -     INFO: Preprocessing completed: run3 spectral options {'scf': True, 'dos': True, 'dispersion': True}
2018-11-08 17:52:18,053 -     INFO: WorkflowStep scf starting...
2018-11-08 17:52:18,054 -     INFO: Performing CASTEP spectral SCF...
2018-11-08 17:52:18,054 -     INFO: Performing single-shot CASTEP run on LiCoO2-CollCode29225
2018-11-08 17:54:27,240 -     INFO: WorkflowStep scf completed successfully.
2018-11-08 17:54:27,240 -     INFO: WorkflowStep dos starting...
2018-11-08 17:54:27,240 -     INFO: Performing CASTEP spectral DOS calculation...
2018-11-08 17:54:27,240 -     INFO: Performing single-shot CASTEP run on LiCoO2-CollCode29225
2018-11-08 17:55:12,218 -     INFO: Performing OptaDOS pDOS calculation with parameters from LiCoO2.odi
2018-11-08 17:55:12,219 -     INFO: Calling executable optados MPI program on LiCoO2-CollCode29225
2018-11-08 17:55:13,644 -     INFO: Executable optados finished cleanly.
2018-11-08 17:55:13,644 -     INFO: Performing OptaDOS DOS calculation with parameters from LiCoO2.odi
2018-11-08 17:55:13,645 -     INFO: Calling executable optados MPI program on LiCoO2-CollCode29225
2018-11-08 17:55:14,442 -     INFO: Executable optados finished cleanly.
2018-11-08 17:55:14,443 -     INFO: WorkflowStep dos completed successfully.
2018-11-08 17:55:14,443 -     INFO: WorkflowStep dispersion starting...
2018-11-08 17:55:14,443 -     INFO: Performing CASTEP spectral dispersion calculation...
2018-11-08 17:55:14,443 -     INFO: Performing single-shot CASTEP run on LiCoO2-CollCode29225
2018-11-08 17:56:36,032 -     INFO: Performing OptaDOS pDIS calculation with parameters from LiCoO2.odi
2018-11-08 17:56:36,033 -     INFO: Calling executable optados MPI program on LiCoO2-CollCode29225
2018-11-08 17:56:36,678 -     INFO: Executable optados finished cleanly.
2018-11-08 17:56:36,678 -     INFO: WorkflowStep dispersion completed successfully.
2018-11-08 17:56:36,678 -     INFO: Writing results of Workflow CastepSpectralWorkflow run to res file and tidying up.
2018-11-08 17:56:36,678 -     INFO: Moving files to completed: /home/matthew/src/matador/examples/bandstructure+dos/projected/completed.
2018-11-08 17:56:36,679 -     INFO: FullRelaxer finished successfully for LiCoO2-CollCode29225

To plot the results, we simply provide the path and seedname; the plot_spectral will search for any files named completed/LiCoO2-CollCode29225* and try to interpret them as bands, DOS and projector outputs.

[11]:
%matplotlib inline
from matador.plotting import plot_spectral
[12]:
plot_spectral('completed/LiCoO2-CollCode29225', pdis_point_scale=25)
Loading settings from /home/matthew/.matadorrc
Displaying plot...
../../_images/notebooks_non-interactive_projected_spectral_5_1.png