Coder Social home page Coder Social logo

scm-nv / nano-qmflows Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 10.0 42.68 MB

Package containing several workflows to compute molecular properties for nanomaterials

License: Apache License 2.0

Python 91.79% C++ 7.92% Shell 0.29%
chemistry materials nanomaterials physics quantum-chemistry science scientific-workflows

nano-qmflows's People

Contributors

bvb93 avatar dependabot[bot] avatar felipez avatar iinfant76 avatar juliette1996 avatar prokophapala avatar roandinho avatar ultimoboulevard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nano-qmflows's Issues

Improvement of the logfile during the calculation of the couplings

  • On-the-fly update of terminated single point calculations. Now it just prints everything at the beginning and at the end.
  • On-the-fly update of overlap files during reading.
  • Adding version of qmworks-namd at the beginning of the file, including branch, latest branch update. Issue a warning when there is a most recent version available.

Cell parameter only accepts real

The cell_parameters input keyword should accept one of the following three types:

  • float
  • [float, float, float]
  • [[float, float, float], [float, float, float], [float, float, float]]

Currently it only accepts the first type

Memory allocation during the coupling calculation

The derivative couplings computations are started once all the molecular orbitals have been calculated. Then, all the coupling calculation are scheduled, holding in memory all the molecular orbitals until they are requested. It cause a huge memory consumption.

Update cell on each point of the trajectory or stack of coordinates

In case of a NPT trajectory or a set of differently shaped structures, the cell parameters change at each structure. It'd be nice to update the cell parameters values by reading an external file (like the .cell from cp2k) or by using a list of lists with the cell parameters.

Compute a new Guess in case the CP2K calculation fails due to SCF convergence

Currently the workflow_coupling implementation works in such a way that if the CP2K calculation fails due to a SCF convergence problem, further calculation are carried out even though they contain garbage results.
If a CP2K calculation fails we should relaunch an OT calculation to compute new more accurate guess for the Wave function.

Improve input specification

Currently the input specification is quite verbose, I would be great to replace the yaml input for something more simple like:

workflow:
  distribute_derivative_couplings
project_name: FAPbI3
dt: 1
algorithm: "levine"
tracking: False
path_traj_xyz: "../../2.6nm_FAPbI3_PBE_MDRES-pos-1.xyz"
blocks: 5

workdir: "."
path_hdf5: "FAPbI3.hdf5"
scratch_path: "/tmp/test/derivative_couplings"
runner: multiprocessing
job_scheduler:
  scheduler: SLURM
  nodes: 1
  tasks: 24
  wall_time: "24:00:00"
  load_modules: "source activate qmflows\nmodule load eb\n module load CP2K/5.1-foss-2017b\n"

cp2k_general_settings:
  nHOMO: 100    
  path_basis: "/home/v13/cp2k_basis/BASIS_MOLOPT"
  path_potential: "/home/v13/cp2k_basis/GTH_POTENTIALS"
  potential: "GTH-PBE"
  basis: "DZVP-MOLOPT-SR-GTH"
  cell_parameters: 45.0
  cell_angles: [90.0, 90.0, 90.0]

cp2k_settings_main:
    specific:
      template: pbe_main

cp2k_settings_guess:
     mo_index_range: [1933, 2182]
     specific:
      template:
        pbe_guess

fixed future warning

Fix the following numpy warnings:

test/test_absorption_spectrum.py::test_oscillators_multiprocessing
  /home/travis/build/SCM-NV/qmflows-namd/nac/workflows/workflow_stddft_spectrum.py:425: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    return np.stack(sum(len(x) for x in ys[i]) for i in range(len(mol)))
test/test_absorption_spectrum.py::test_oscillators_multiprocessing
  /home/travis/build/SCM-NV/qmflows-namd/nac/workflows/workflow_stddft_spectrum.py:455: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    hardness_vec = np.stack(hardness(mol[i][0]) for i in range(n_atoms)).reshape(n_atoms, 1)
test/test_absorption_spectrum.py::test_oscillators_multiprocessing
  /home/travis/build/SCM-NV/qmflows-namd/nac/workflows/workflow_stddft_spectrum.py:142: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    for i in range(nocc*nvirt))
test/test_absorption_spectrum.py::test_oscillators_multiprocessing
  /home/travis/build/SCM-NV/qmflows-namd/nac/workflows/workflow_stddft_spectrum.py:387: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    output[:, 6] = np.hstack(np.max(xia[:, i] ** 2) for i in range(nocc*nvirt))
test/test_absorption_spectrum.py::test_oscillators_multiprocessing
  /home/travis/build/SCM-NV/qmflows-namd/nac/workflows/workflow_stddft_spectrum.py:393: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    xia[:, i] ** 2)) for i in range(nocc*nvirt)).reshape(nocc*nvirt)
test/test_absorption_spectrum.py::test_oscillators_multiprocessing
  /home/travis/build/SCM-NV/qmflows-namd/nac/workflows/workflow_stddft_spectrum.py:396: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    output[:, 7] = np.stack(excs[index_weight[i]][0] for i in range(nocc*nvirt)) + 1
test/test_absorption_spectrum.py::test_oscillators_multiprocessing
  /home/travis/build/SCM-NV/qmflows-namd/nac/workflows/workflow_stddft_spectrum.py:400: FutureWarning: arrays to stack must be passed as a "sequence" type such as list or tuple. Support for non-sequence iterables such as generators is deprecated as of NumPy 1.16 and will raise an error in the future.
    output[:, 9] = np.stack(excs[index_weight[i]][1] for i in range(nocc*nvirt)) + 1

compute the overlap integrals only once for the stddft

On the previous implementation the overlaps and the multipoles the integral were computed separately. In the current implementation both the overlap and the multipole integrals are computed when the multipole funcion is called.
Avoid the double computation of the overlaps by calling the multipole only once.

Implementing spin-orbit coupling

Implementing spin-orbit coupling as a perturbation for improved couplings. This is especially important for excited states in perovskites.

Non-adiabatic derivative couplings from TDDFT calculations

Computing at two consecutive time steps the non-adiabatic coupling vectors from excited states computed at the TDDFT level of theory. The calculation can follow the approach from :
J. Phys. Chem. Lett., 2015, 6 (21), pp 4200โ€“4203

Implementing exciton descriptors

This addition will help in the analysis of the wavefunction obtained at the DFT level. It requires the overlap, dipole and quadrupole matrices in AO basis that are already implemented.

unkown nocc and nvirt

The std_workflow finishes with the following error:

nac/workflows/workflow_stddft_spectrum.py", line 475, in construct_A_matrix_tddft
 k_iajb = pqrs_K[:nocc, nocc:, :nocc, nocc:].reshape(nocc*nvirt, nocc*nvirt)
ValueError: can only specify one unknown dimension

Reduce complexity in the input specification of the C2pK calculation

Currently the user needs to specified the for a cp2k run something like:

  settings_main:
    potential: "GTH-PBE"
    basis: "DZVP-MOLOPT-SR-GTH"
    cell_parameters: 38.0  
    cell_angles: [90.0, 90.0, 90.0]
    specific:
      cp2k:
        force_eval:
          subsys:
            cell:
              periodic: "None"
            kind:
              Cs:
                BASIS_SET: DZVP-MOLOPT-SR-GTH-q9
                POTENTIAL: GTH-PBE-q9
              Pb: 
                BASIS_SET: DZVP-MOLOPT-SR-GTH-q4
                POTENTIAL: GTH-PBE-q4
              Br: 
                BASIS_SET: DZVP-MOLOPT-SR-GTH-q7
                POTENTIAL: GTH-PBE-q7
          dft:
            BASIS_SET_FILE_NAME: "/home/v13/cp2k_basis/BASIS_MOLOPT"
            POTENTIAL_FILE_NAME: "/home/v13/cp2k_basis/GTH_POTENTIALS"
            xc:
              xc_functional: "pbe"
            scf:
              eps_scf: 0.0005
              max_scf: 200
              added_mos: 35
            print:
              mo:
                mo_index_range: "1453 1507"

While in the input for the workflow the keywords nHOMO and ci_range are mandatory. The mo_index_range is the same keyword that ci_range (except one is a tuple and the other a str).
While the added_most can be deduce like:

added_mos = ci_range[1] - ci_range[0] - nHOMO + 1

Therefore the following actions are required:

  • Replace ci_range keyword by mo_index_range and add it to the general settings
  • Compute the added_mos keyword based on the available info
  • Create templates for the PBE and PBE0 computations in CP2K

Adding simulation timestep as an input variable

We have now some simulations where the time step is either 2.5fs and 5fs. We will run into problems when delta_t is included in the calculation of the coupling. We assume now that delta_t = 1fs always (I guess).

Differentiate the avoided from the trivial crossings

Currently the coupling calculation algorithm does not distinguish between the avoided and the trivial crossings. The trivial crossing must have a value of zero while the avoided crossings are different of zero.

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.