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
cd | |
rsync -a --exclude=*/__pycache__ /data/scratch/pysages . &> /dev/null | |
find pysages -type f \( -name "*.py" -name "*.sh" \) -exec sed -i "s|/data/scratch|$HOME|g" {} + | |
. pysages/modules.sh | |
python -m pip -q install ParmEd | |
python -m pip -q install netCDF4 |
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
cd | |
rsync -a --exclude=*/__pycache__ /data/scratch/pysages-ase . &> /dev/null | |
find pysages-ase -type f \( -name *.py -name *.sh \) -exec sed -i "s|/data/scratch|$HOME|g" {} + | |
module purge | |
module load cuda | |
source $HOME/pysages-ase/bin/activate | |
alias python="python3" |
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
using LinearAlgebra | |
using CUDA, StaticArrays, Zygote | |
dihedral_angle(p₁, p₂, p₃, p₄) = dihedral_angle(p₂ - p₁, p₃ - p₂, p₄ - p₃) | |
@inline function dihedral_angle(a, b, c) | |
p = a × b | |
q = b × c | |
return atan((p × q) ⋅ b, (p ⋅ q) * norm(b)) | |
end |
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 jaxlib.xla_extension import DeviceArray as JaxArray | |
from jax.tree_util import register_pytree_node | |
from plum import dispatch, parametric | |
from typing import Tuple | |
import jax.numpy as jnp | |
def register_pytree_parametric(cls): | |
register_pytree_node( |
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
# Esta opción es suficiente para pasar el ejercicio, | |
# pero abajo hay una opción aún más rápida | |
function remove_in_each_row_no_vcat(img, column_numbers) | |
@assert size(img, 1) == length(column_numbers) # same as the number of rows | |
m, n = size(img) | |
local img′ = similar(img, m, n-1) # create a similar image with one less column | |
for (i, j) in enumerate(column_numbers) | |
# EDIT THE FOLLOWING LINE and split it into two lines |
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
:-) GROMACS - ssages, VERSION 5.1.3-dev-20160713-01db2c5752-dirty (-: | |
GROMACS is written by: | |
Emile Apol Rossen Apostolov Herman J.C. Berendsen Par Bjelkmar | |
Aldert van Buuren Rudi van Drunen Anton Feenstra Sebastian Fritsch | |
Gerrit Groenhof Christoph Junghans Anca Hamuraru Vincent Hindriksen | |
Dimitrios Karkoulis Peter Kasson Jiri Kraus Carsten Kutzner | |
Per Larsson Justin A. Lemkul Magnus Lundborg Pieter Meulenhoff | |
Erik Marklund Teemu Murtola Szilard Pall Sander Pronk | |
Roland Schulz Alexey Shvetsov Michael Shirts Alfons Sijbers |
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
#!/bin/sh | |
# This configuration file was taken from <https://github.com/JuliaParallel/MPI.jl> | |
set -e | |
set -x | |
MPI_IMPL="$1" | |
os=`uname` | |
OMPIVER=4.0.3 | |
MPICHVER=3.3.2 |
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
# This example work for strings but can be easily adapted to other streams of data | |
function compress(str::String, hdict) | |
nbits = sum(c -> hdict[c][2], str) | |
bv = falses(nbits) | |
n = 0 | |
for c in str | |
code, i = hdict[c] # code and number of bits | |
d = div(n, 64) + 1 # current storage chunk | |
r = 64 * d - n # number of bits available in the current chunk | |
u = (i < r) ? (code << (r - i)) : (code >> (i - r)) |
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
function unique_recursive(itr) | |
T = Base._default_eltype(typeof(itr)) | |
out = Vector{T}() | |
seen = Set{T}() | |
i = start(itr) | |
if done(itr, i) | |
return out | |
end | |
x, i = next(itr, i) | |
if !isleaftype(T) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder