Project for calculating parameters for a more realistic modelling of exciton superfluids in van der Waals Heterostructures.
Go to the main_results
directory to reproduce the main results of the article. In this directory you will also find more documentation on the computational methods. In the text below, we cover how to install necessary dependencies and for convenience we also list useful commands.
You need a virtual environment with GPAW to run calculations. If on NiflHeim, use the install_gpaw.sh
. Other dependencies are listed in requirements.txt. Run the following command to install the python packages
pip install -r requirements.txt
The BiEx code package used to solve the gap equation is available from the authors upon reasonable request.
module add intel
Navigate to repo folder on gbar. Then you can run the following:
- Submit job on 8 cores for 4 hours
mq submit script.py -R 8:4h
- Submit job
WSe2_bb.py
afterWSe2_gs.py
has completed:
mq submit WSe2_bb.py -d WSe2_gs.py -R 8:4h
- List jobs
mq ls
- Remove job
mq rm -i JOBID
- Help
mq help
- Help on command (e.g. rm command)
mq rm -h
- Login with Forward X11 (use dtu user password)
ssh -XY [email protected]
- Log onto a compute node
linuxsh -X
- Create virtual environment: Follow instructions here
- Activate virtual environemtn (you can add this to your
.bashrc
)
source ~/path-to-your-venv/bin/activate
- Launch interactive jupyter notebook (replace
venv
with name of your virtual environment)
python -m ipykernel install --user --name=venv
jupyter notebook --no-browser --port 40000 --ip=$HOSTNAME
Open new terminal locally and run (USERNAME: your DTU username, HOSTNAME: servername you see in the other window (n-XX- YY-ZZ), PORT: 40000)
ssh [email protected] -g -L8080:HOSTNAME:PORT -N
Go into your browser and open: http://localhost:8080. When you are creating a new note notebook on the web browser, go to “new” and then choose the name of your virtual environment to make it work. If you already have written the notebook, just go to “kernel” -> “change kernel” and choose your respective environment.
Note: You need to have cloned the repo and logged in with git to run the following commands. Checkout a beginner's guide to git, if you are unfamiliar with it.
- Check which files/folders have been modified.
git status
- View changes for a spceific file. (This command opens up a
less
editor/program. Typeh
for help andq
to exit).
git diff [filename]
- Add modified file to "staging area" (i.e. tell git, that you intent to commit this modified file)
git add [filename]
- Add all modified files
git add *
- Commit added files
git commit -m "message"
- Push file to remote repository (upload changes)
git push
- Pull latest commits from remote repository (download latest changes)
git pull
Add the Remote-SSH-extension to VSCode and connect to the host (ssh -XY [email protected]
) using their getting started guide.
Trouble shooting with Remote-SHH
If the remote ssh-connection suddenly fails (e.g. displays password prompt again and again), you can try the following:
- Open the command pallet (CTRL + SHIFT + P or COMMAND + SHIFT + P (mac) ).
- Type
Remote-SSH: Kill VS Code Server on Host
. Then try to connect again
This may only work on a mac (unix system) because the X11-forwarding seems to be unsupported for VSCode on Windows. On the hpc compute node, run the following command:
- (optional) Set a password for the Jupyter Notebook Server:
jupyter notebook password
- Launch a Jupyer server with the following command:
jupyter notebook --no-browser --port 40000 --ip=$HOSTNAME
This outputs a Jupyter server address (e.g. http://n-10-10-1:40000/). Connect to the Jupyter Server as described here (don't include a token). Type the password when prompted to do so.
- Open up a jupyter notebook file (ipynb-file). In the top right corner, choose the remote venv kernel.