---
# System prepended metadata

title: Chenxing

---

# Chenxing

## Installation of `cij`

git clone the `cij` repository

`git clone https://github.com/MineralsCloud/cij.git`

Install `cij`
`pip install -U ./cij`

## Example 1: akimotoite
Proceed as follows,
`cd /cij/examples/akimotoite`

The `settings.yaml` file.
```
qha:
  input: input01
  settings:
    # similar to settings in qha
    DT: 100
    P_MIN: 0
    DELTA_P: 0.5
    NTV: 81
    order: 3
    static_only: False
    T_MIN: 0
    NT: 31
    DT_SAMPLE: 100
    DELTA_P_SAMPLE: 5
    volume_ratio: 1.2
elast:
  input: elast.dat
  settings:
    mode_gamma:
      interpolator: spline
      order: 3
    symmetry:
      system: cubic
output:
  pressure_base:
    - cij
    - vs
    - vp
    - bm_V
    - bm_R
    - bm_VRH
    - G_V
    - G_R
    - G_VRH
    - v
  volume_base:
    - p
    # ...
```

Run the `settings.yaml` file
`cij run settings.yaml`

To plot the results,
`cij plot *.txt`

**Link to paper**
[`cij` paper](https://www.sciencedirect.com/science/article/pii/S001046552100179X)

Extract calculation results. (Abbreviations in table.3 of the paper)
`cij extract -v 'bm_VRH,G_VRH,v_s,v_p' -T 300 `

Output to a single file
`cij extract -v 'bm_VRH,G_VRH,v_s,v_p' -T 300 > elast300.dat`

`cij run-static --p-min 0 --delta-p 1 --delta p-sample 1  -n 80 input01 --interp 'pressure'`

`cij run-static --p-min 0 --delta-p 1 --delta-p-sample 1 -n 40 input01 --interp 'pressure'`

`cij run-static --p-min 0 --delta-p 1 --delta-p-sample 1 -n 40 input01 --interp 'pressure' input02`

`cij run-static input01 input02 -s 'trigonal7' `

## Example 2: bridgmanite
`cij run settings.yaml`

# Static
`cd`
`wget http://snf-4850.vlab.ac.ke:8000/mphys.tar.gz`
`mkdir mphys`
`tar -xzf mphys.tar.gz -C mphys`
`. /home/$USER/mphys/bin/activate`
`conda-unpack`
`wget http://snf-4850.vlab.ac.ke:8000/workflow.tar.gz`
`tar -xvf workflow.tar.gz `
`mkdir test`
`mv workflow/ test/`
`cd test/workflow`
`mkdir pseudo && wget -qO- http://www.physics.rutgers.edu/gbrv/all_lda_UPF_v1.5.tar.gz | tar -xzv -C pseudo `

Get the path to pseudo and use it in input files `templates/relax.in` and `templates/elastic.in` 
`realpath pseudo`

### perform eos calculation
`snakemake -j4 vc_target`

Activate conda environment
`conda activate ~/miniconda3/envs/qe/`

Change k-points in `templates/relax.in` and `templates/elastic.in` to
`2 2 2 1 1 1`

`bash run-serial.sh relax/`

### Get eos results
`. qe/bin/deactivate`
`. mphys/bin/activate`
`snakemake -j4 vc_eos`
`. mphys/bin/deactivate`

### create the input files for elasticity calculation

`. mphys/bin/activate`
`snakemake -j4 elast_target`
`. mphys/bin/deactivate`


# perform elasticity calculation

`. qe/bin/activate`
`bash run-serial.sh elast`
`. qe/bin/deactivate`

Edit config.yaml to keep only one volume (or the volume that finishes)

`. mphys/bin/activate`
`snakemake -j4 elast_dat`
`. mphys/bin/deactivate`