This file contains 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 numpy as np | |
import matplotlib.pyplot as plt | |
import mrcfile | |
import random | |
################################################################################################# | |
nanodisc_diameter = 170 # Angstrom, change this value for nanodisc of different sizes | |
################################################################################################# |
This file contains 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 numpy as np | |
import matplotlib.pyplot as plt | |
import mrcfile | |
n = 64 # 3D map size in pixels | |
distance_ringcenter_to_boxcenter = n/2.0 * 0.5 | |
radius_ring = distance_ringcenter_to_boxcenter * 0.1 | |
def buildTorus(n, distance_ringcenter_to_boxcenter, radius_ring): | |
# http://mathworld.wolfram.com/Torus.html |
This file contains 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 | |
# by Wen Jiang @ Purdue University | |
import sys, argparse | |
import pandas as pd | |
import numpy as np | |
def main(): | |
args = parse_command_line() |
This file contains 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, sys, random, math | |
import pandas as pd | |
import EMAN2 | |
try: | |
mapFile, lstFile, nHelices, twist, maxTilt, maxShift = sys.argv[1:] | |
projFile = os.path.splitext(lstFile)[0]+".mrcs" | |
nHelices = int(nHelices) | |
twist = float(twist) | |
maxTilt = float(maxTilt) |
This file contains 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 os, sys, argparse | |
def main(): | |
args = parse_command_line() | |
try: | |
nodesCompressed = os.environ.get("SLURM_JOB_NODELIST").split(",") | |
except: | |
print("ERROR: environment variable SLURM_JOB_NODELIST does not exist") |
This file contains 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 | |
# by Wen Jiang @ Purdue University | |
import sys, argparse | |
try: | |
import pandas as pd | |
import numpy as np | |
import scipy | |
except: |
This file contains 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 EMAN2 import * | |
sym = "icos" | |
xf = Transform() | |
xf.to_identity() | |
nsym=xf.get_nsym(sym) | |
for i in range(nsym): | |
e = xf.get_sym(sym, i) | |
m = e.get_params("matrix") |
This file contains 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, sys | |
import numpy as np | |
import mrcfile | |
if len(sys.argv)!=2: | |
print(f"Usage: {sys.argv[0]} <mrc file>") | |
sys.exit(-1) | |
imageFile = sys.argv[1] | |
prefix = os.path.splitext(imageFile)[0] |
This file contains 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 sys, mrcfile | |
import numpy as np | |
from skimage.io import imsave | |
if len(sys.argv)!=3: | |
print(f"Usage: {sys.argv[0]} <input.mrc> <outputPrefix>") | |
sys.exit(-1) |