This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
import gnuplotlib as gp | |
from ase.io import read | |
from sys import argv | |
import numpy as np | |
atoms = [] | |
for fname in argv[1:]: | |
try: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from math import exp | |
from ase import Atoms | |
from ase.io import read | |
from ase.neighborlist import natural_cutoffs, NeighborList | |
import numpy as np | |
from icecream import ic | |
atoms = read("FILENAME") | |
def get_d3_CN(atoms: Atoms, use_d3_radii=True, k1=16, k2=4/3, mult=0.9): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -eq 1 ]; then | |
rm ~/.tmpdb.db ~/.tmpdb.db.lock 2> /dev/null | |
cp $1 ~/.tmpdb.db | |
exit 0 | |
elif [ $# -eq 0 ]; then | |
echo "Not enough arguments: Supply db file as arg1" | |
exit 1 | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, glob | |
os.chdir(os.path.dirname(os.path.realpath(__file__))) | |
print >>open('./FolderTally.csv', 'w'),"Folder, Unmarked, SD, HD" | |
for dir in glob.iglob("./*/"): | |
count=0 | |
full=glob.glob("./"+dir+"/*") | |
dirs=glob.glob("./"+dir+"/*/") | |
dirs=map(lambda x: x[:-1], dirs) | |
for file in full: | |
if file not in dirs and "thumbs" not in file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
Queues=$(qlist | tail -n +5 | head -n -1 | awk '{print $1}' | xargs) | |
OUT="NAME MAXCONCURRENT QUEUED HOLD RUN FREE WALLTIME" | |
for q in $Queues | |
do | |
echo $q | |
Q=$( qstat "${q}" | tail -n +3 | awk '{print $3}' | sort | uniq | xargs -n 1 qstat -u 2>/dev/null | awk '$10 == "Q"' | awk '{print $7}' | paste -sd+ - | bc) | |
if [ "$Q" = "" ] | |
then | |
Q=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from ase.io import read | |
def WriteForce(outdata, atoms): | |
''' | |
Write the max last reported force in the system. | |
''' | |
f = [] | |
last = -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##REQUIRED IMPORTS | |
from ase.io import read | |
from ase.io.trajectory import PickleTrajectory | |
from gpaw import GPAW | |
from gpaw import Mixer | |
from ase.parallel import parprint | |
import os.path | |
import sys | |
import os | |
##REQUIRED IMPORTS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ase.io import read | |
from ase.data import covalent_radii as CR | |
import sys | |
from datetime import datetime | |
import numpy as np | |
def get_coordination_numbers(atoms, covalent_percent=1.25): | |
"""Returns an array of coordination numbers and an array of existing bonds determined by | |
distance and covalent radii. By default a bond is defined as 120% of the combined radii |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pymatgen.matproj.rest import MPRester | |
from pymatgen.core.ion import Ion | |
from pymatgen import Element | |
from pymatgen.phasediagram.pdmaker import PhaseDiagram | |
from pymatgen.analysis.pourbaix.entry import PourbaixEntry, IonEntry | |
from pymatgen.analysis.pourbaix.maker import PourbaixDiagram | |
from pymatgen.analysis.pourbaix.plotter import PourbaixPlotter | |
from pymatgen.entries.compatibility import MaterialsProjectAqueousCompatibility |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by Tristan Maxson, data at https://docs.google.com/spreadsheets/d/11GjntlqLki_ft-ocHRLSnCfVtxVzh3JCdqcqHr5RMGE | |
from __future__ import division | |
from sys import argv as args | |
import random | |
TCost = [None, 500, 1000, 2000, 4000, 10000] | |
TNum = [None, 3, 3, 4, 4, 5] | |
def RollCase(chance=[80, 15, 3, 1.5, 0.4, 0.1]): | |
def sum(z): |