https://github.com/chem-william/calc_current
Calculates the current density through a molecule using wide-band approximated electrodes
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 2 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.0%) to scientific vocabulary
Repository
Calculates the current density through a molecule using wide-band approximated electrodes
Basic Info
Statistics
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
calc_current
Calculates the Landauer transmission and current density for a given molecule in a junction. The electrodes are assumed to be two dihydrogens.
It uses a Rust script to calculate the gradient. The source code can be grabbed here
Due to some API changes of GPAW (specifically the change from dump_hamiltonian_parallel to dump_hamiltonian_and_overlap), the latest supported version of GPAW is 20.1.0
Workspace assumptions
The following assumes you're running the calculation on a system that uses SLURM.
You need two things in the same folder: a file named hhjunc.traj that contains the junction and a file named config that, as a minimum, contains the indices for the top and bottom atoms on the z-axis. You then run the following command
```bash
currentsubmit
How to use calc_current
To use calccurrent, you need to generate a junction using junction.py. It will look for .xyz file in the same folder as itself.
The script attaches two dihydrogens at specified locations at the molecule in the .xyz. It creates a `hhjunc.traj` which will subsequently be used for calculating the current density.
To modify where the electrodes are attached to the molecule, you'll have to edit start_indices, end_indices and the A, D1, and D2 parameters of create_junction(). The first electrode is attached at a dihedral angle of D1 formed from the three indices of start_indices and D1. Likewise for the second electrode, end_indices, and D2.
The current density calculation requires a configuration file that specifies at least the top and bottom atoms of the molecule, which define the z-axis and are used to color the arrows by their z-component and φ-component. A minimal configuration file looks like this:
bash
top_atom=index_of_top_atom
bottom_atom=index_of_bottom_atom
You can use ASE with the following command to view your molecule and the indices of each atom:
bash
ase gui molecule.xyz
ASE can also show .traj files so you can plot the junction with the following command
bash
ase gui hh_junc.traj
Other options for the config file include the following (the default value is shown):
* ef=0 The energy at which to calculate the current density. The default is the midpoint between the energy of the HOMO and the LUMO
* functional=pbe The functional that is used to calculate the electronic structure.
* h_spacing=0.2 Specifies the grid spacing in Å that has to be used for the realspace representation of the smooth wave functions
* charge=0 Charge of the molecule
* cutoff=20 How many arrows to include in the plot of the current density. A value of 20 corresponds to not plotting arrows smaller than 5% of the largest arrow.
Contact
Please feel free to open an issue if you have any questions or notice that something might be wrong!
Otherwise, my contact information can be found here
Owner
- Name: William Bro-Jørgensen
- Login: chem-william
- Kind: user
- Company: University of Copenhagen
- Repositories: 26
- Profile: https://github.com/chem-william
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1