text
stringlengths
0
1.05M
meta
dict
""" Program to analyse the trace of atoms in a plane Examples: md_planetrace.py -f md.xtc -s md.tpr --sel "resname AAC and name C1" """ import numpy as np import matplotlib.pylab as plt from sgenlib import moldyn from sgenlib import mdactions from sgenlib import colors class PlaneTraceAnalysis(mdactions.Trajecto...
{ "repo_name": "SGenheden/Scripts", "path": "Md/md_planetrace.py", "copies": "1", "size": "2625", "license": "mit", "hash": 6310725680459119000, "line_mean": 33.5394736842, "line_max": 81, "alpha_frac": 0.5935238095, "autogenerated": false, "ratio": 3.4448818897637796, "config_test": false, "h...
""" Program to analyse the weights of all solutes in a list The solutes are taken from the Minnesota solvation database """ import argparse import re import numpy as np import matplotlib.pylab as plt import dblib mass = { 'H' : 1.0079 , 'He' : 4.0026 , 'Li' : 6.941 , 'Be' : 9.0122 , 'B' : 10.8...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/analyse_weight.py", "copies": "1", "size": "4657", "license": "mit", "hash": 1726759675746831600, "line_mean": 41.7247706422, "line_max": 111, "alpha_frac": 0.4524371913, "autogenerated": false, "ratio": 2.4863854778430325, "config_...
""" Program to analyze the extent of alcohols """ import numpy as np import MDAnalysis.core.distances as mddist from sgenlib import moldyn from sgenlib import mdactions from sgenlib import pbc class AlcoholLenAnalysis(mdactions.TrajectoryAction) : def add_arguments(self, parser): parser.add_argument('-...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Yeast/md_alcohol_len.py", "copies": "1", "size": "1477", "license": "mit", "hash": 6744343981349602000, "line_mean": 33.3488372093, "line_max": 89, "alpha_frac": 0.6668923494, "autogenerated": false, "ratio": 3.3265765765765765, "config_test"...
""" Program to build a CG or AA/CG dual-resolution system from an AA system. Converts AA residues automatically to CG using dictionary of conversions. Writes out LAMMPS datafiles and include file for the force field, as well as a PDB-file. """ import sys import math import random import argparse import os import cop...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/aa2cg.py", "copies": "1", "size": "11978", "license": "mit", "hash": -4079916321603657700, "line_mean": 38.5313531353, "line_max": 171, "alpha_frac": 0.6001001837, "autogenerated": false, "ratio": 3.2372972972972973, "config_test": false, "ha...
""" Program to build lipids from a template, similarly to MARTINI INSANE Is VERY experimental! """ import argparse import os import xml.etree.ElementTree as ET import numpy as np from sgenlib import pdb class BeadDefinition(object): def __init__(self): self.name = None self.xyz = None de...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/build_lipid.py", "copies": "1", "size": "3765", "license": "mit", "hash": -8760421902141514000, "line_mean": 26.6838235294, "line_max": 87, "alpha_frac": 0.5561752988, "autogenerated": false, "ratio": 3.613243761996161, "config_test": false, ...
""" Program to build molecules by looking up there SMILES string in ChemSpider and then converting the SMILES to an xyz file. The SPIDERKEY environmental variable needs to be set ChemSpider access key. If the molecule could not be found in ChemSpider the molecule name is printed with a double exclamation mark (!!) a...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/build_mols.py", "copies": "1", "size": "1713", "license": "mit", "hash": 8129505886533388000, "line_mean": 29.0526315789, "line_max": 91, "alpha_frac": 0.6567425569, "autogenerated": false, "ratio": 3.6369426751592355, "config_test": false, "has...
""" Program to calculate bond force constant with the Seminario method for specific bonds Ref: JM Seminario, Int. J. Quant. Chem. 1996, 60(7), 1271-1277 Examples: seminario.py -f model.fchk -s model.gro -b 1:N-4:CU 1:ND1-4:CU 2:NE2-4:CU """ import argparse import os import numpy as np from sgenlib import pdb def...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/seminario.py", "copies": "1", "size": "3971", "license": "mit", "hash": -6715517803161007000, "line_mean": 31.5491803279, "line_max": 107, "alpha_frac": 0.6154621002, "autogenerated": false, "ratio": 2.8344039971448964, "config_test": false, "ha...
""" Program to calculate how many water molecules are leaking into the membrane """ import argparse import math import numpy as np from sgenlib import parsing from sgenlib import mol def _count_water_inside(dens1, dens2, fi, li, fx, lx) : return sum(dens1[fi:li]) def _count_water_inside2(dens1, dens2, fi, l...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/water_leakage.py", "copies": "1", "size": "3011", "license": "mit", "hash": 1650182540499696600, "line_mean": 39.1466666667, "line_max": 92, "alpha_frac": 0.6496180671, "autogenerated": false, "ratio": 2.8868648130393098, "config_test": false...
""" Program to calculate RDF in a two-component system """ import argparse import MDAnalysis from MDAnalysis.analysis import rdf def _anal_rdf(u, sel1, sel2, exl, filename): g1 = u.select_atoms(sel1) g2 = u.select_atoms(sel2) rdfo = rdf.InterRDF(g1, g2, exclusion_block=exl, step=50) rdfo.run() ...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Trehalose/anal_rdf_twocomp.py", "copies": "1", "size": "3270", "license": "mit", "hash": 3698655820952567300, "line_mean": 55.3793103448, "line_max": 145, "alpha_frac": 0.6259938838, "autogenerated": false, "ratio": 2.6076555023923444, "confi...
""" Program to calculate the RDF of a group of atoms Experimental code! """ import numpy as np import MDAnalysis.core.distances as mddist from sgenlib import moldyn from sgenlib import mdactions from sgenlib import pbc class RdfAnalysis(mdactions.TrajectoryAction) : def add_arguments(self, parser): p...
{ "repo_name": "SGenheden/Scripts", "path": "Md/md_rdf.py", "copies": "1", "size": "3382", "license": "mit", "hash": -5761366409229040000, "line_mean": 39.7469879518, "line_max": 106, "alpha_frac": 0.6105854524, "autogenerated": false, "ratio": 3.3551587301587302, "config_test": false, "has_no...
""" Program to calculate the RDF of a solute in a membrane Experimental code! """ import numpy as np import MDAnalysis.lib.distances as mddist import scipy.spatial.distance as scidist from sgenlib import moldyn from sgenlib import mdactions from sgenlib import pbc class SolMemRdf(mdactions.TrajectoryAction) : ...
{ "repo_name": "SGenheden/Scripts", "path": "Md/md_solmem_rdf.py", "copies": "1", "size": "3860", "license": "mit", "hash": 150321294595210460, "line_mean": 40.9565217391, "line_max": 120, "alpha_frac": 0.5829015544, "autogenerated": false, "ratio": 3.468104222821204, "config_test": false, "ha...
""" Program to calculate the vdW energy between a ROH bead and protein beads on a rectangular grid Writes out the 3D grid in dx-format and an averaged 2D plot in png-format Example: gpcr_plot_gridenergy.py -p system.top -m b2 """ import argparse import os import sys import numpy as np import matplotlib if not "D...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Gpcr/gpcr_plot_gridenergy.py", "copies": "1", "size": "5586", "license": "mit", "hash": 1086574698830983600, "line_mean": 33.4814814815, "line_max": 138, "alpha_frac": 0.6407089151, "autogenerated": false, "ratio": 2.787425149700599, "config_...
""" Program to collect APR results for a list of output Examples: collect_apr.py list """ import argparse import glob import logging import os import numpy as np from sgenlib import parsing from sgenlib import series from sgenlib import umbrella def _pull_win(str) : a, b = str.split("_p") return int(b.sp...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/collect_apr.py", "copies": "1", "size": "8729", "license": "mit", "hash": 4343058596077332500, "line_mean": 36.952173913, "line_max": 100, "alpha_frac": 0.6039637988, "autogenerated": false, "ratio": 2.9720803541028262, "config_test": false, ...
""" Program to collect TI results and put them in an Excel sheet Examples: collect_results.py -db MNSol_alldata.txt -solvent hexanol -solutes hexanolwater.txt -xls out.xlsx -sheet hexanolwater """ import argparse import os import openpyxl as xl import numpy as np import scipy.stats as stats fro...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/collect_results.py", "copies": "1", "size": "9215", "license": "mit", "hash": -1476078661439771100, "line_mean": 39.5947136564, "line_max": 116, "alpha_frac": 0.6086814976, "autogenerated": false, "ratio": 2.9096937164509, "config_t...
""" Program to collect TI results for a list of output Examples: collect_ti.py list """ import argparse import os import numpy as np def _integrate(filename): """ Read a PMF from an Lammps output file and integrate it """ lines = [] with open(filename,"r") as f : lines = f.readlines() ...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/collect_ti.py", "copies": "1", "size": "2550", "license": "mit", "hash": -520111865741755900, "line_mean": 32.5526315789, "line_max": 120, "alpha_frac": 0.5854901961, "autogenerated": false, "ratio": 3.474114441416894, "config_test": false, "...
""" Program to collect TI results for Zhang solutes Examples: collect_zhange.py -solvent octanol -solutes list """ import argparse import os import numpy as np def _integrate(filename): """ Read a PMF from an Lammps output file and integrate it """ lines = [] with open(filename,"r") as f : ...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/collect_zhang.py", "copies": "1", "size": "2031", "license": "mit", "hash": -4678289076901469000, "line_mean": 32.2950819672, "line_max": 99, "alpha_frac": 0.5814869522, "autogenerated": false, "ratio": 3.37375415282392, "config_tes...
""" Program to compute BEDROC metrics for a set of solutes The -f file should contain the true value in the first column and the test value in the second column For each super group, it will compute: - BEDROC metric assuming a uniform distribution - BEDROC metric on the observed data - A p-value on the d...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/solute_bedroc.py", "copies": "1", "size": "5650", "license": "mit", "hash": -1098442233394960900, "line_mean": 36.9194630872, "line_max": 112, "alpha_frac": 0.5725663717, "autogenerated": false, "ratio": 3.309900410076157, "config_test": false, ...
""" Program to compute bulk density of solutes from densities """ import argparse import math import re import numpy as np from sgenlib import parsing from sgenlib import mol def _count_solute_inside(dens1, dens2, fi, li, fx, lx, **kwargs) : return sum(kwargs["soldens"][fi:li]) def _membrane_vol(dens1, dens2...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Yeast/calc_bulk_dens.py", "copies": "1", "size": "4974", "license": "mit", "hash": -4445635610758369300, "line_mean": 40.45, "line_max": 98, "alpha_frac": 0.6399276236, "autogenerated": false, "ratio": 2.7420066152149944, "config_test": false...
""" Program to compute the contact matrix Examples: """ import numpy as np import MDAnalysis as md import MDAnalysis.analysis.distances as mddist from MDAnalysis.core.groups import AtomGroup from sgenlib import moldyn from sgenlib import mdactions class ContactMatrixAnalysis(mdactions.TrajectoryAction) : def...
{ "repo_name": "SGenheden/Scripts", "path": "Md/md_contactmat.py", "copies": "1", "size": "2136", "license": "mit", "hash": 26247113585507070, "line_mean": 30.4117647059, "line_max": 84, "alpha_frac": 0.5936329588, "autogenerated": false, "ratio": 3.513157894736842, "config_test": false, "has_...
""" Program to compute the potential of mean force (PMF) from a set of umbrella simulations of small solutes in a membrane """ import argparse import matplotlib matplotlib.use('Agg') import matplotlib.pylab as plt import numpy as np import numpy.random as random import scipy.stats as stats import wham if __name__ ...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/calc_pmf.py", "copies": "1", "size": "10660", "license": "mit", "hash": -6764018850449185000, "line_mean": 49.0469483568, "line_max": 160, "alpha_frac": 0.6397748593, "autogenerated": false, "ratio": 3.4101087651951376, "config_test": false, ...
""" Program to compute where two densities cross """ import argparse import math import numpy as np from sgenlib import parsing if __name__ == '__main__' : parser = argparse.ArgumentParser(description="Calculate density intercept") parser.add_argument('-f', '--file', help="the density file from g_density"...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/density_intercept.py", "copies": "1", "size": "1151", "license": "mit", "hash": -3282447309238946300, "line_mean": 30.9722222222, "line_max": 127, "alpha_frac": 0.6298870547, "autogenerated": false, "ratio": 2.849009900990099, "config_test": ...
""" Program to convert a GRO file to PDB and in the process add CONECT records """ import sys,os from sgenlib import pdb import argparse def make_con(filename) : lines = open(filename,"r").readlines() con_raw = [] all_ind = [] for line in lines : cols = line.strip().split() con_raw.append((int(cols[...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/gro2pdb_con.py", "copies": "1", "size": "2384", "license": "mit", "hash": 390743751437694140, "line_mean": 29.1772151899, "line_max": 120, "alpha_frac": 0.6371644295, "autogenerated": false, "ratio": 3.0292249047013975, "config_test": false, "ha...
""" Program to convert a Gromacs top file to an itp-file. This is not a bullet-proof procedure that works in all situations! Works for small solutes created with param_solutes.py and this was the usage it was created for Examples: top2itp.py file1.itp file2.itp """ import argparse import os def _convert(filename, ...
{ "repo_name": "SGenheden/Scripts", "path": "Gromacs/top2itp.py", "copies": "1", "size": "1574", "license": "mit", "hash": -7753719622631931000, "line_mean": 29.2692307692, "line_max": 103, "alpha_frac": 0.5978398983, "autogenerated": false, "ratio": 3.4669603524229076, "config_test": false, "...
""" Program to convert a LAMMPS datafile into a PDB file using a conversion dictionary or a template PDB file Example: lmp_data2pdb.py data.128dopc_kalp23 -o 128dopc_kalp23_initial.pdb -d 0:wat 1-128:dop 129:kalp23_leap.pdb """ import argparse import os import sys import numpy as np from sgenlib import lammps fr...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_data2pdb.py", "copies": "1", "size": "6725", "license": "mit", "hash": 4567521565773612000, "line_mean": 33.3112244898, "line_max": 144, "alpha_frac": 0.6617100372, "autogenerated": false, "ratio": 3.2535074987905177, "config_test": false, ...
""" Program to convert a SMILES string to 3D coordinates using one of two web services. The format of the list when using the --inlist option should be name1 SMILES1 name2 SMILES2 ... Examples -------- smiles2xyz.py COH smiles2xyz.py -o ethanol.xyz CCOH smiles2xyz.py --inlist smiles.txt """ import argparse f...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/smiles2xyz.py", "copies": "1", "size": "1332", "license": "mit", "hash": -6230522817697499000, "line_mean": 35, "line_max": 198, "alpha_frac": 0.6869369369, "autogenerated": false, "ratio": 3.2487804878048783, "config_test": false, "has_no_keywo...
""" Program to convert a unsaturated acyl chain to a saturated chain in a topology (itp-file). Works for Slipid force field. Uses in membrane engineering project Examples -------- saturate_topol.py -f dopc.top -a C29 -o dopc_saturated.itp """ import argparse import os import parmed def _get_atom(parm, name) : ...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/saturate_topol.py", "copies": "1", "size": "4880", "license": "mit", "hash": -2426592454349267500, "line_mean": 33.3661971831, "line_max": 103, "alpha_frac": 0.6227459016, "autogenerated": false, "ratio": 2.840512223515716, "config_test": fal...
""" Program to count hydrogen bonds in a protein The analysis is done on all atoms but also on only backbone and only side chain atoms Examples -------- md_hbonds.py -f md2.xtc -s md1.gro """ import argparse import MDAnalysis from MDAnalysis.analysis import hbonds class HydrogenBondAnalysis_mainchain(hbonds.Hydro...
{ "repo_name": "SGenheden/Scripts", "path": "Md/md_hbonds.py", "copies": "1", "size": "2019", "license": "mit", "hash": 7958351633811658000, "line_mean": 33.2203389831, "line_max": 94, "alpha_frac": 0.6225854383, "autogenerated": false, "ratio": 3, "config_test": false, "has_no_keywords": fals...
""" Program to count hydrogen bonds in a two-component system Examples: python calc_hbonds_twocomp.py -f r1_md2_whole.xtc -s r1_md2.tpr --sel "all" -out r1_hbonds.pickle python calc_hbonds_twocomp.py -f template.xyz wt1kalpotAllAtoms.xyz -s template.pdb --angle 150 """ import argparse import MDAnalysis from...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Trehalose/calc_hbonds_twocomp.py", "copies": "1", "size": "1674", "license": "mit", "hash": -7091120357145300000, "line_mean": 37.9302325581, "line_max": 101, "alpha_frac": 0.6720430108, "autogenerated": false, "ratio": 3.1885714285714286, "c...
""" Program to create a hybrid MARTINI topology The AA structure should have the same order as the structure created by automartini. This is important since antechamber reshuffles the atoms. This script requires the branch write_virtualn of my version of parmed available at https://github.com/SGenheden/ParmEd/ Exam...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/make_hybridtop.py", "copies": "1", "size": "2749", "license": "mit", "hash": 1402394134033674200, "line_mean": 34.7012987013, "line_max": 92, "alpha_frac": 0.6413241179, "autogenerated": false, "ratio": 3.414906832298137, "config_test": false, "...
""" Program to create RESP input Used in membrane engineering project Examples -------- make_respin.py -f model0_1.pdb -e model0_1.esp --zero C8 H81 H82 H83 C2 H22 H23 C1 H11 H12 H13 -q "C3 C7" "H71 H72 H31 H32" "H51 H10" "C4 C6" "H41 H61" -n 38 make input based on model0_1, zerp charges on C8 H81, etc and equiv...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/make_respin.py", "copies": "1", "size": "2865", "license": "mit", "hash": -3965491508126810000, "line_mean": 35.2658227848, "line_max": 157, "alpha_frac": 0.5469458988, "autogenerated": false, "ratio": 3.114130434782609, "config_test": false, "h...
""" Program to do hydrogen mass repartition on a lammps datafile Will increase the mass of the hydrogen and decrease mass of the heavy atoms bonded to them. The default output is the input data file with a "_heavyh" string appended Examples lmp_massrepart.py data.kalp23 -f 3 """ import argparse import copy fro...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_massrepart.py", "copies": "1", "size": "4723", "license": "mit", "hash": 3148137033583823000, "line_mean": 37.7131147541, "line_max": 124, "alpha_frac": 0.6540334533, "autogenerated": false, "ratio": 3.169798657718121, "config_test": false,...
""" Program to draw CRAC and CCM motifs on x-ray structures No arguments are necessary, all structures are taken from standard locations """ import os import sys import numpy as np import matplotlib if not "DISPLAY" in os.environ or os.environ["DISPLAY"] == "" : matplotlib.use('Agg') import matplotlib.pyplot as ...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Gpcr/gpcr_plot_motif.py", "copies": "1", "size": "3807", "license": "mit", "hash": -9186679386970050000, "line_mean": 32.3947368421, "line_max": 124, "alpha_frac": 0.5873391122, "autogenerated": false, "ratio": 2.6659663865546217, "config_tes...
""" Program to draw roughness (fractal) pies on structures No arguments are necessary, all structures are taken from standard locations """ import argparse import os import sys import numpy as np import scipy.stats as stats import matplotlib if not "DISPLAY" in os.environ or os.environ["DISPLAY"] == "" : matplot...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Gpcr/gpcr_anal_exposure.py", "copies": "1", "size": "2615", "license": "mit", "hash": -8144343289943158000, "line_mean": 34.8219178082, "line_max": 116, "alpha_frac": 0.6084130019, "autogenerated": false, "ratio": 3.0584795321637426, "config_...
""" Program to extend the topology (itp-file) of a lipid such that the acyl chains are longer. Assumes Slipid force field. Used in membrane engineering project Examples -------- extend_topol.py -f dopc.top -a 20 -o dopx.itp extends DOPC to C20 chains """ import argparse import os import parmed def _get_atom(pa...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/extend_topol.py", "copies": "1", "size": "5263", "license": "mit", "hash": -8004263362137716000, "line_mean": 33.3986928105, "line_max": 101, "alpha_frac": 0.6241687251, "autogenerated": false, "ratio": 3.160960960960961, "config_test": false...
""" Program to extract information from a Gaussian dihedral scan It will write out energies and plot them to a .png file I can create input for single-point calculations and PDB files for future use Used in membrane engineering project Examples -------- extract_scan.py theta1_opt.log -c 6 5 1 2 -p "theta1_mp2=#MP2...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/extract_scan.py", "copies": "1", "size": "5734", "license": "mit", "hash": 126500502319601040, "line_mean": 34.3950617284, "line_max": 115, "alpha_frac": 0.5816184165, "autogenerated": false, "ratio": 3.4253285543608123, "config_test": false, "h...
""" Program to find missing force field parameters and look them up in CHARMM36 Parses a log file from grompp and files in the toppar archive Used in membrane engineering project Examples -------- find_missing_lipidff.py -l grompp.log -p model0.top -f toppar/par_all36_cgenff.prm toppar/stream/lipid/toppar_all36_li...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/find_missing_lipidff.py", "copies": "1", "size": "5772", "license": "mit", "hash": -3036020967456874000, "line_mean": 32.5581395349, "line_max": 136, "alpha_frac": 0.5438322938, "autogenerated": false, "ratio": 3.445970149253731, "config_test": fa...
""" Program to fit an AA structure onto a CG structure by overlaying the backbone atoms at the BB bead """ import argparse import os import sys import numpy as np from sgenlib import fitting from sgenlib import pdb if __name__ == '__main__' : # Setup a parser of the command-line arguments parser = argparse.Ar...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/fit_aa2cg.py", "copies": "1", "size": "1716", "license": "mit", "hash": -4394051575587396000, "line_mean": 25.8125, "line_max": 98, "alpha_frac": 0.6445221445, "autogenerated": false, "ratio": 3.0052539404553413, "config_test": false, "has_no_ke...
""" Program to insert a solute at different depths in a liposome Two solutes will be inserted by moving them in the opposite direction from the center of the liposome The solute will all likely overlap with the liposome and therefore it is essential to grow it before attemping e.g. umbrella sampling Example: inse...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/insert_in_liposome.py", "copies": "1", "size": "3691", "license": "mit", "hash": 4790540717745369000, "line_mean": 33.820754717, "line_max": 115, "alpha_frac": 0.6393931184, "autogenerated": false, "ratio": 3.165523156089194, "config_test": f...
""" Program to insert a solute at different depths in a membrane Two solutes will be inserted separated by half a box length in the membrane plane and the total separation in z. The solute will all likely overlap with the membrane and therefore it is essential to grow it before attemping e.g. umbrella sampling Exam...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/insert_in_membrane.py", "copies": "1", "size": "4405", "license": "mit", "hash": -5138116765120569000, "line_mean": 33.4140625, "line_max": 101, "alpha_frac": 0.5952326901, "autogenerated": false, "ratio": 2.9683288409703503, "config_test": f...
""" Program to insert cholesterol in a CG membrane by replacing phospholipids The current mapping is: C2 --> C3B C1 --> C2B R5 --> C1B R2 --> C1A R1 --> GL2 ROH --> GL1 Example: python insert_chol.py -f popc_mem.gro -c chol_single.gro -n 60 """ import argparse import copy import numpy a...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/insert_chol.py", "copies": "1", "size": "4040", "license": "mit", "hash": 5739050832921598000, "line_mean": 32.6666666667, "line_max": 101, "alpha_frac": 0.6205445545, "autogenerated": false, "ratio": 3.263327948303716, "config_test": false, ...
""" Program to list the SMILES string for each solute in a list """ import argparse import os from chemspipy import ChemSpider import dblib if __name__ == '__main__': argparser = argparse.ArgumentParser(description="Script to list SMILES for a solutes in a list") argparser.add_argument('-db', '--db', help...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/create_smiles_list.py", "copies": "1", "size": "1273", "license": "mit", "hash": -1453221160674888000, "line_mean": 37.5757575758, "line_max": 100, "alpha_frac": 0.6535742341, "autogenerated": false, "ratio": 3.2724935732647813, "co...
""" Program to make 2D scatter plots of data """ import argparse import numpy as np import matplotlib.pylab as plt import matplotlib.lines as mlines import matplotlib.transforms as transforms from sgenlib import colors from sgenlib import parsing from sgenlib import series if __name__ == '__main__' : parser =...
{ "repo_name": "SGenheden/Scripts", "path": "Plot/plot_xy.py", "copies": "1", "size": "8120", "license": "mit", "hash": -8955793941713085000, "line_mean": 46.485380117, "line_max": 131, "alpha_frac": 0.609729064, "autogenerated": false, "ratio": 3.2610441767068274, "config_test": false, "has_n...
""" Program to make 2D scatter plots of densities computed with g_density """ import argparse import re import numpy as np import matplotlib.pylab as plt from sgenlib import colors def _parse_xvgfile(filename) : lines = [] with open(filename, 'r') as f: lines = f.readlines() i = 0 while l...
{ "repo_name": "SGenheden/Scripts", "path": "Plot/plot_densities.py", "copies": "1", "size": "3526", "license": "mit", "hash": 4043494891439537700, "line_mean": 34.6161616162, "line_max": 104, "alpha_frac": 0.5899035735, "autogenerated": false, "ratio": 3.3076923076923075, "config_test": false, ...
""" Program to make a datafile prettier If the datafile was created from a restart, the atoms are for instance not in order, this fixes that The default output is the input data file with a "_pretty" string appended Examples: lmp_prettify.py data.128dmpc_kalp23_pushed lmp_prettify.py data.128dmpc_kalp23_pushed...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_prettify.py", "copies": "1", "size": "1343", "license": "mit", "hash": 9141222514167578000, "line_mean": 29.5227272727, "line_max": 113, "alpha_frac": 0.7163067759, "autogenerated": false, "ratio": 3.2916666666666665, "config_test": false, ...
""" Program to make a Gromacs ndx-file for deuterium order parameter calculations """ import sys import os import argparse from sgenlib import pdb from sgenlib import groups if __name__ == "__main__": # Setup a parser of the command-line arguments parser = argparse.ArgumentParser(description="Program make S2...
{ "repo_name": "SGenheden/Scripts", "path": "Gromacs/gmx_s2_groups.py", "copies": "1", "size": "1584", "license": "mit", "hash": 5416973631844728000, "line_mean": 31.3265306122, "line_max": 77, "alpha_frac": 0.6887626263, "autogenerated": false, "ratio": 3.3488372093023258, "config_test": false,...
""" Program to make a Gromacs residue template file """ import argparse import parmed if __name__ == "__main__": parser = argparse.ArgumentParser(description="Program to make RTP entries") parser.add_argument('-f','--file',help="the input structure file") parser.add_argument('-t','--template',help="a t...
{ "repo_name": "SGenheden/Scripts", "path": "Gromacs/gmx_make_dbentry.py", "copies": "1", "size": "1397", "license": "mit", "hash": 4807580321592115000, "line_mean": 28.7234042553, "line_max": 79, "alpha_frac": 0.5619183966, "autogenerated": false, "ratio": 3.4324324324324325, "config_test": fal...
""" Program to make a Lammps datafile from a PDB file """ import sys import math import random import argparse import os import copy import numpy as np from sgenlib import lammps from sgenlib import pdb if __name__ == '__main__' : # Command-line input parser = argparse.ArgumentParser(description="Make a Lammp...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_makedata.py", "copies": "1", "size": "3323", "license": "mit", "hash": -700147181451821600, "line_mean": 33.9789473684, "line_max": 115, "alpha_frac": 0.6746915438, "autogenerated": false, "ratio": 3.164761904761905, "config_test": false, ...
""" Program to make a PDB structure whole after wrapping in central periodic box Default name is input with "_whole" appended to the end Examples -------- pdb_makewhole.py prot.pdb """ import argparse import os import sys from sgenlib import pbc from sgenlib import pdb if __name__ == '__main__' : # Command-l...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/pdb_makewhole.py", "copies": "1", "size": "1530", "license": "mit", "hash": -1329578805172829700, "line_mean": 27.3333333333, "line_max": 86, "alpha_frac": 0.668627451, "autogenerated": false, "ratio": 3.1875, "config_test": false, "has_no_keywo...
""" Program to make a plummed-common input file for umbrella sampling of the distance between a membrane and one or more solutes The atom indices are taken from a Gromacs index file Examples: make_plumed.py --solutes AAC1 AAC2 """ import argparse from sgenlib import groups if __name__ == '__main__' : parse...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/make_plumed.py", "copies": "1", "size": "1220", "license": "mit", "hash": -4964994281114684000, "line_mean": 35.9696969697, "line_max": 99, "alpha_frac": 0.6598360656, "autogenerated": false, "ratio": 3.0964467005076144, "config_test": false,...
""" Program to make a polyunsaturated lipid, e.g. add an additional double bond in a DOPC topology (itp-file). Works for Slipid force field. Uses in membrane engineering project Examples -------- unsaturate_topol.py -f dopc.top -sn1 9 12 -sn2 9 12 -o dupc.itp unsaturate_topol.py -f dopc.top -sn1 9 122 -sn2 9 12 15 -...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/unsaturate_topol.py", "copies": "1", "size": "6138", "license": "mit", "hash": 3005349041947979000, "line_mean": 32.7252747253, "line_max": 105, "alpha_frac": 0.5925382861, "autogenerated": false, "ratio": 3.2119309262166404, "config_test": f...
""" Program to make bar plots of data DOES NOT work great """ import argparse import numpy as np import matplotlib.pylab as plt from sgenlib import colors from sgenlib import parsing def _plot_single(data, errors, headers, barlabels, ylabel, fig): a = fig.add_axes((0.2,0.15,0.75,0.75)) ngroups = data.s...
{ "repo_name": "SGenheden/Scripts", "path": "Plot/plot_multibars.py", "copies": "1", "size": "3660", "license": "mit", "hash": 2308265470903816000, "line_mean": 32.5779816514, "line_max": 104, "alpha_frac": 0.606010929, "autogenerated": false, "ratio": 3.0098684210526314, "config_test": false, ...
""" Program to make bar plots of data """ import argparse import numpy as np import matplotlib.pylab as plt from sgenlib import colors from sgenlib import parsing if __name__ == '__main__' : parser = argparse.ArgumentParser(description="Plot bar plots") parser.add_argument('-f','--file',nargs="+",help="the ba...
{ "repo_name": "SGenheden/Scripts", "path": "Plot/plot_bars.py", "copies": "1", "size": "1497", "license": "mit", "hash": 3266267380024218600, "line_mean": 36.425, "line_max": 141, "alpha_frac": 0.6786907148, "autogenerated": false, "ratio": 2.9468503937007875, "config_test": false, "has_no_ke...
""" Program to make input to Gaussian for (R)ESPA calculations Examples -------- pdb2respa_inp.py mol1.pdb mol2.pdb pdb2respa_inp.py mol1.pdb -v ff03 -c -1 """ import sys import os import argparse import time import numpy as np from sgenlib import pdb if __name__ == '__main__' : # Command-line input ...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/pdb2respa_inp.py", "copies": "1", "size": "1634", "license": "mit", "hash": -6548830868626519000, "line_mean": 33.0416666667, "line_max": 137, "alpha_frac": 0.6444308446, "autogenerated": false, "ratio": 2.92831541218638, "config_test": false, "...
""" Program to make input to the colvars library to perform umbrella sampling simulations with Lammps It will produce an output file for each value of the --zdepth argument Example: make_colvars.py data.elba_toluene_z0 -m 1 128 -s 129 -z {0..30} """ import argparse from sgenlib import lammps if __name__ == '__m...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/make_colvars.py", "copies": "1", "size": "2112", "license": "mit", "hash": 2368670337701534700, "line_mean": 25.7341772152, "line_max": 108, "alpha_frac": 0.6647727273, "autogenerated": false, "ratio": 3.119645494830133, "config_test": false, ...
""" Program to make PQR file from a Gromacs topology and a structure file """ import argparse import os import sys from sgenlib import pdb from sgenlib import gmx def _parse_radii(atom, topol) : def _neigh(iatom, topol, hydrogen=False): neigh = [] for bond in topol.bonds : if len(bo...
{ "repo_name": "SGenheden/Scripts", "path": "Gromacs/gmx2pqr.py", "copies": "1", "size": "2658", "license": "mit", "hash": 9031726548694923000, "line_mean": 29.9069767442, "line_max": 100, "alpha_frac": 0.5583145222, "autogenerated": false, "ratio": 3.3266583229036297, "config_test": false, "h...
""" Program to make proper Glycam pair parameters for 1-4 neighbours that acpype.py cannot hanndle """ import argparse import math from sgenlib import gmx if __name__ == "__main__": parser = argparse.ArgumentParser(description="Program make Glycam pair params") parser.add_argument('-f','--file',help="the i...
{ "repo_name": "SGenheden/Scripts", "path": "Gromacs/gmx_glycampairs.py", "copies": "1", "size": "1441", "license": "mit", "hash": 3772861129860108300, "line_mean": 27.82, "line_max": 83, "alpha_frac": 0.6030534351, "autogenerated": false, "ratio": 3.216517857142857, "config_test": false, "has...
""" Program to make the molecules in a datafile whole The default output is the input data file with a "_whole" string appended Example: lmp_makewhole.py data.128dopc_4232wat """ import argparse import os import sys import numpy as np from sgenlib import lammps from sgenlib import pdb from sgenlib import pbc i...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_makewhole.py", "copies": "1", "size": "1436", "license": "mit", "hash": 2582619617298987500, "line_mean": 24.1929824561, "line_max": 93, "alpha_frac": 0.6733983287, "autogenerated": false, "ratio": 2.9916666666666667, "config_test": false, ...
""" Program to match the residue numbers of one structure with another. """ import sys import argparse from sgenlib import pdb if __name__ == "__main__": # Setup a parser of the command-line arguments parser = argparse.ArgumentParser(description="Program to match residue number of 2 PDB files") parser.add_a...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/pdb_matchres.py", "copies": "1", "size": "2306", "license": "mit", "hash": -5738300670936033000, "line_mean": 36.8032786885, "line_max": 114, "alpha_frac": 0.6452732003, "autogenerated": false, "ratio": 2.9716494845360826, "config_test": false, ...
""" Program to modify LJ parameters in LAMMPS inclusion file """ import argparse from collections import namedtuple import numpy as np from sgenlib import lammps if __name__ == '__main__': # Command-line input parser = argparse.ArgumentParser(description="Modifying LJ parameters in LAMMPS inclusion file")...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_mod_lj.py", "copies": "1", "size": "2061", "license": "mit", "hash": -1581642278163860700, "line_mean": 35.1578947368, "line_max": 116, "alpha_frac": 0.6263949539, "autogenerated": false, "ratio": 3.5110732538330494, "config_test": false, ...
""" Program to modify the atom type of some atoms in a datafile The --atoms argument is a list of atom specification, which is in format MOLRANGE:ATOMID The default output is the input data file with a "_mod" string appended Examples lmp_mod_atype.py data.128dopc_4232wat -a 1-128:9 1-128:15 -t 7 --increase """ i...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_mod_atype.py", "copies": "1", "size": "1809", "license": "mit", "hash": -297910521752958140, "line_mean": 33.1320754717, "line_max": 106, "alpha_frac": 0.7009397457, "autogenerated": false, "ratio": 3.3314917127071824, "config_test": false,...
""" Program to """ import argparse import os import subprocess import numpy as np import dblib if __name__ == '__main__': argparser = argparse.ArgumentParser(description="Script to check output") argparser.add_argument('-db', '--db', help="the molecule database") argparser.add_argument('-solvent', '--...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/check_results.py", "copies": "1", "size": "1941", "license": "mit", "hash": 3432788773369506300, "line_mean": 40.2978723404, "line_max": 121, "alpha_frac": 0.6331787738, "autogenerated": false, "ratio": 3.491007194244604, "config_te...
""" Program to obtain SMILES for the solutes in the Minnesota solvation database Examples: param_solutes.py -db MNSol_alldata.txt -solvent hexanol -solutes hexanolwater.txt -xyzdir MNSolDatabase-v2012/all_solutes/ """ import argparse import os from chemspipy import ChemSpider import dblib if __nam...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/collect_smiles.py", "copies": "1", "size": "1581", "license": "mit", "hash": -180486705063321200, "line_mean": 32.6382978723, "line_max": 102, "alpha_frac": 0.6521189121, "autogenerated": false, "ratio": 3.3354430379746836, "config_...
""" Program to optimize LJ parameters Used in a project to paramettrize ELBA ions """ import argparse import numpy as np import matplotlib.pylab as plt import scipy.optimize as opt from sgenlib import parsing def objfunc(x,hfecoeff,iodcoeff,hfefit,iodfit): x2 = x*x x3 = x2*x hfex = hfecoeff[0]*x3+hfe...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/optimize_rmin2.py", "copies": "1", "size": "1905", "license": "mit", "hash": 4514896152470490600, "line_mean": 31.8448275862, "line_max": 141, "alpha_frac": 0.6304461942, "autogenerated": false, "ratio": 2.42984693877551, "config_test": false, "...
""" Program to parametrise solutes from a list Examples: param_solutes.py list """ import argparse import os import string import numpy as np import MDAnalysis as md import parmed from sgenlib import ambertools leapcmd=""" source leaprc.gaff loadamberprep %s.prepi loadamberparams %s.frcmod x=loadpdb %s.pdb saveam...
{ "repo_name": "SGenheden/Scripts", "path": "Mol/param_solutes.py", "copies": "1", "size": "3553", "license": "mit", "hash": 3720365775096932000, "line_mean": 29.8956521739, "line_max": 105, "alpha_frac": 0.5966788629, "autogenerated": false, "ratio": 3.2776752767527677, "config_test": false, ...
""" Program to parametrise solutes from the Minnesota solvation database Examples: param_solutes.py -db MNSol_alldata.txt -solvent hexanol -solutes hexanolwater.txt -xyzdir MNSolDatabase-v2012/all_solutes/ """ import argparse import os import numpy as np import MDAnalysis as md import dblib from sg...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/param_solutes.py", "copies": "1", "size": "3961", "license": "mit", "hash": 3429147823764348000, "line_mean": 36.3679245283, "line_max": 98, "alpha_frac": 0.5854582176, "autogenerated": false, "ratio": 3.0075930144267273, "config_te...
""" Program to perform hydrogen mass repartitioning of a Gromacs topology file Used in membrane engineering project Examples -------- gmx_hmassrepart.py -f dopc.top -o dopc_heavyh.itp """ import argparse import os import sys import parmed if __name__ == "__main__": parser = argparse.ArgumentParser(description...
{ "repo_name": "SGenheden/Scripts", "path": "Gromacs/gmx_hmassrepart.py", "copies": "1", "size": "1365", "license": "mit", "hash": -2004755076142724400, "line_mean": 30.0227272727, "line_max": 95, "alpha_frac": 0.641025641, "autogenerated": false, "ratio": 3.3455882352941178, "config_test": fals...
""" Program to perform MSD analysis of a trajectory Experimental code! """ import numpy as np from sgenlib import moldyn from sgenlib import mdactions from sgenlib import pbc class MsdWalker(object): def __init__(self, time, owner): self.time = time self.origin = owner.atoms.get_positions() ...
{ "repo_name": "SGenheden/Scripts", "path": "Md/md_msd.py", "copies": "1", "size": "5180", "license": "mit", "hash": 322608838950741700, "line_mean": 39.7874015748, "line_max": 116, "alpha_frac": 0.5922779923, "autogenerated": false, "ratio": 3.5997220291869354, "config_test": false, "has_no_k...
""" Program to place a protein next to a membrane for "push"-simulation Example: place_protein.py -prot prot.gro -mem membrane.gro """ import argparse import os import sys import numpy as np from sgenlib import pdb def _clashes(xyz1, xyz2): for i in range(xyz1.shape[0]) : d = np.sum(np.power(xyz2-x...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/place_protein.py", "copies": "1", "size": "2642", "license": "mit", "hash": -7500325625220525000, "line_mean": 33.7631578947, "line_max": 102, "alpha_frac": 0.6551854656, "autogenerated": false, "ratio": 2.9685393258426966, "config_test": fal...
""" Program to plot 2D maps. The maps are named after the input files but with a "png"-extension. Example: plot_2dmap.py -f grid_dhh_low.dat grid_dhh_upp.dat plot_2dmap.py -f grid_dhh_low.dat grid_dhh_upp.dat --ylabel "Y [nm]" --xlabel "X [nm]" --extent 0 10 0 10 --cblabel "Dhh [nm]" --max 5.0 plot_2dmap....
{ "repo_name": "SGenheden/Scripts", "path": "Plot/plot_2dmap.py", "copies": "1", "size": "4835", "license": "mit", "hash": 1347730343664172500, "line_mean": 38.3089430894, "line_max": 159, "alpha_frac": 0.6374353671, "autogenerated": false, "ratio": 2.977216748768473, "config_test": false, "ha...
""" Program to plot boxplots """ import argparse import numpy as np import matplotlib.pylab as plt from sgenlib import parsing if __name__ == '__main__': argparser = argparse.ArgumentParser(description="Script to plot boxplots") argparser.add_argument('-f', '--files', nargs="+", help="the results") ar...
{ "repo_name": "SGenheden/Scripts", "path": "Plot/plot_boxplot.py", "copies": "1", "size": "2637", "license": "mit", "hash": -5741195476757583000, "line_mean": 40.203125, "line_max": 105, "alpha_frac": 0.622298066, "autogenerated": false, "ratio": 3.2880299251870326, "config_test": false, "has...
""" Program to plot molecular densities The program takes as input two sets of files and average the densities in the two sets, creating two averaged densities. The densities are created by gpcr_mdanal.py These densities are then plotted next to each other, for easy comparison, along with a representation of the ba...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Gpcr/gpcr_plot_density.py", "copies": "1", "size": "7979", "license": "mit", "hash": 4116028268894349000, "line_mean": 44.5942857143, "line_max": 153, "alpha_frac": 0.6863015415, "autogenerated": false, "ratio": 2.814462081128748, "config_tes...
""" Program to plot PMFs of small molecules pulled through membranes Very shaky code! """ import sys import matplotlib #matplotlib.use('Agg') import matplotlib.pylab as plt import numpy as np import os import argparse import wham from sgenlib import colors from sgenlib import parsing # The column index into the de...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/plot_pmf.py", "copies": "1", "size": "5524", "license": "mit", "hash": -6284498285847141000, "line_mean": 37.3611111111, "line_max": 271, "alpha_frac": 0.6030050688, "autogenerated": false, "ratio": 2.6596051998074146, "config_test": false, ...
""" Program to plot residue joint contact probability Examples -------- gpcr_plot_rescontacts.py -f r1_md3_en_fit_joint.npz -m ohburr -l oh --mol b2 """ import os import argparse import sys import numpy as np import matplotlib if not "DISPLAY" in os.environ or os.environ["DISPLAY"] == "" : matplotlib.use('Agg') i...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Gpcr/gpcr_plot_resjointcontacts.py", "copies": "1", "size": "3408", "license": "mit", "hash": 3910432250774230000, "line_mean": 33.7755102041, "line_max": 140, "alpha_frac": 0.6775234742, "autogenerated": false, "ratio": 3.0079435127978815, "...
""" Program to plot the correlation between calculated and experimental free energies Examples: plot_correlations.py -xls raw.xlsx -solvents hexane octane nonane hexanol octanol nonanol water """ import argparse import os import openpyxl as xl import numpy as np import matplotlib import matplotlib.pylab as plt im...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/plot_correlations_hybrid.py", "copies": "1", "size": "6027", "license": "mit", "hash": 8209911429270430000, "line_mean": 39.4496644295, "line_max": 109, "alpha_frac": 0.6006304961, "autogenerated": false, "ratio": 3.0797138477261115, ...
""" Program to prep a PDB structure for APR simulations 1.) Align the long axis of the host with the z-axis 2.) Align the short axis of the host with the y-axis 3.) Set origin of the G1 atom 4.) Add dummy atoms to the structure The -a flag specifies the axes of the host It takes to arguments and each argument is a li...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/apr_prep.py", "copies": "1", "size": "4084", "license": "mit", "hash": -558158919627459300, "line_mean": 30.6589147287, "line_max": 103, "alpha_frac": 0.6224289912, "autogenerated": false, "ratio": 3.377998345740281, "config_test": false, "has_n...
""" Program to prepare a PDB-file semi-automatically The program will download the PDB file and metadata automatically from the PDB database. It will describe the most important features about the structure. It will then prompt the user for removal of chains, alternative conformations, hetero residues and the protona...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/pdb_prep.py", "copies": "1", "size": "26188", "license": "mit", "hash": 4149859943267626000, "line_mean": 34.6784741144, "line_max": 179, "alpha_frac": 0.593401558, "autogenerated": false, "ratio": 3.0146195464487167, "config_test": false, "has_...
""" Program to put one PDB-file next to another If no output file is given the mobile PDB file will be overwritten Examples -------- next_to.py -r pdb1.pdb -m pdb2.pdb next_to.py -r pdb1.pdb -m pdb2.pdb -s 0.0 10.0 0.0 next_to.py -r pdb1.pdb -m pdb2.pdb -s 0.0 10.0 0.0 --fromedge """ import argparse import os...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/next_to.py", "copies": "1", "size": "1887", "license": "mit", "hash": 7183685584645675000, "line_mean": 30.9830508475, "line_max": 137, "alpha_frac": 0.6984631691, "autogenerated": false, "ratio": 3.1928934010152283, "config_test": false, "has_n...
""" Program to reduce the number of water in a membrane, from e.g. 50 to 40 waters per lipid """ import argparse import numpy as np from sgenlib import pdb if __name__ == '__main__' : parser = argparse.ArgumentParser(description="Remove water from mebrane") parser.add_argument('-f','--file',help="the inpu...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/remove_water.py", "copies": "1", "size": "2230", "license": "mit", "hash": 4605971290778515500, "line_mean": 32.2835820896, "line_max": 107, "alpha_frac": 0.6224215247, "autogenerated": false, "ratio": 3.2272069464544137, "config_test": false...
""" Program to rename atoms and residue Examples -------- pdb_rename.py mystruct.pdb -atoms POPC=names_popc.txt TIP3P=names_wat.txt -from Charmm -to Berger -residues TIP3P=SOL """ import argparse import os import sys import numpy as np from sgenlib import pdb def _readconv(filename,fro,to) : lines = open(fil...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/pdb_rename.py", "copies": "1", "size": "1978", "license": "mit", "hash": -921862758901061600, "line_mean": 28.0882352941, "line_max": 119, "alpha_frac": 0.6577350859, "autogenerated": false, "ratio": 3.1648, "config_test": false, "has_no_keyword...
""" Program to replace a double bond in a lipid acyl chain with a cyclopropane group. Assumes Slipid force field. Used in membrane engineering project Examples -------- grow_cyclic.py -f single_popi.gro -r POPI -o single_popi_cyc.gro -t slipids.ff/popi.top -d popi_cyc.rtp Make a Gromacs residue template (rtp) fi...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/grow_cyclic.py", "copies": "1", "size": "11096", "license": "mit", "hash": -5196430017614651000, "line_mean": 37, "line_max": 130, "alpha_frac": 0.5649783706, "autogenerated": false, "ratio": 3.1666666666666665, "config_test": false, "has_n...
""" Program to replace some POPI residues in a membrane patch with IPC lipids. Assumes Slipid force field. Used in membrane engineering project Examples -------- popimem2ipcmem.py -f ../32popi_22dopc_10erg/em_whole.gro -t ipc.pdb -z ipc.zmat -i ../slipids.ff/ipc.itp -n 10 > replaced.gro """ import sys import argpar...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/popimem2ipcmem.py", "copies": "1", "size": "8346", "license": "mit", "hash": -5879097914403328000, "line_mean": 42.2435233161, "line_max": 208, "alpha_frac": 0.6379103762, "autogenerated": false, "ratio": 2.7699966810487884, "config_test": fa...
""" Program to replace the coordinates in a datafile with those of a PDB The default output is the input data file with a "_repxyz" string appended Example: lmp_replace_dataxyz.py -f data.200popc_b2 -p 200popc_b2_pushed.pdb """ import os import sys import argparse import numpy as np from sgenlib import pdb from...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_replace_dataxyz.py", "copies": "1", "size": "1259", "license": "mit", "hash": -2207313695355755000, "line_mean": 27.6136363636, "line_max": 115, "alpha_frac": 0.7084988086, "autogenerated": false, "ratio": 3.1712846347607053, "config_test":...
""" Program to run external commands on a solutes from the Minnesota solvation database Examples: run_commands.py -db MNSol_alldata.txt -solvent hexanol -solutes hexanolwater.txt -commands insert_command """ import argparse import dblib from sgenlib import ambertools if __name__ == '__main__': ...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/run_commands.py", "copies": "1", "size": "1565", "license": "mit", "hash": 1039110399167573900, "line_mean": 37.1707317073, "line_max": 104, "alpha_frac": 0.6479233227, "autogenerated": false, "ratio": 3.699763593380615, "config_tes...
""" Program to scale CG-AA pair interactions in LAMMPS inclusion file The CG-AA pairs need to have a comment including "AA-CG mixed" to be regonized as such. The --beads argument is a list of bead specification, each one contains a comma-separated list of atom types. The pairs between these atom types and AA types w...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/scale_elba_pairs.py", "copies": "1", "size": "2694", "license": "mit", "hash": -5616976688091390000, "line_mean": 36.9436619718, "line_max": 151, "alpha_frac": 0.6796585004, "autogenerated": false, "ratio": 3.301470588235294, "config_test": fal...
""" Program to setup a ComQum-ELBA run Part of ComQum-ELBA """ import argparse import numpy as np from sgenlib import lammps control_str = \ """$point_charges file=pointcharges $operating system unix $path $symmetry c1 $coord file=coord $scfintunit unit=30 size=0 file=twoint $scfconv 6 $scfiterl...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_comqum.py", "copies": "1", "size": "2693", "license": "mit", "hash": -8545883923262683000, "line_mean": 25.6633663366, "line_max": 119, "alpha_frac": 0.6037875975, "autogenerated": false, "ratio": 2.8317560462670874, "config_test": false, ...
""" Program to setup LAMMPS restraints for APR calculations """ import argparse import numpy as np from sgenlib import geo from sgenlib import pdb colvarstr=""" colvarsTrajFrequency 2500 colvarsRestartFrequency 0 colvar { name d1 width 1.0 distance { group1 { atomNumbers 1 } group2 { a...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/make_apr_rest.py", "copies": "1", "size": "5458", "license": "mit", "hash": 1200641399341220600, "line_mean": 33.3270440252, "line_max": 123, "alpha_frac": 0.5538658849, "autogenerated": false, "ratio": 2.7961065573770494, "config_test": false,...
""" Program to shorten the topology (itp-file) of a lipid such that the acyl chains are shorter. Assumes Slipid force field. Uses in membrane engineering project Examples -------- shorten_topol.py -f dopc.top -a 16 -o dopx.itp shorten DOPC to C16 chains """ import argparse import os import parmed def _get_atom...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/shorten_topol.py", "copies": "1", "size": "4409", "license": "mit", "hash": -4423929794572489000, "line_mean": 30.9492753623, "line_max": 101, "alpha_frac": 0.6103424813, "autogenerated": false, "ratio": 3.3200301204819276, "config_test": fal...
""" Program to solvate a MARTINI CG or GAFF/CG system Assumes last include is the solute itp file Examples: solvate_martini.py -b octanol_box.gro -s eth_cg_box.gro -os eth_solvated.gro -i martini_v2.2.itp martini_v2.0_solvents.itp eth_cg.itp -m OCO -ot eth_system.top solvate_martini.py -b water_box.gro -s et...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Solvation/solvate_martini.py", "copies": "1", "size": "3939", "license": "mit", "hash": 3761266142746668500, "line_mean": 34.1696428571, "line_max": 163, "alpha_frac": 0.5346534653, "autogenerated": false, "ratio": 3.2580645161290325, "config...
""" Program to sort the residues in a PDB file Default name is input with "_sorted" appended to the end Examples -------- sort_residues.py prot.pdb -r SOL WAT CL """ import sys import argparse import os import numpy as np from sgenlib import pdb if __name__ == '__main__' : # Command-line input parser = ar...
{ "repo_name": "SGenheden/Scripts", "path": "Pdb/sort_residues.py", "copies": "1", "size": "1352", "license": "mit", "hash": -3814311966526904300, "line_mean": 25.5098039216, "line_max": 86, "alpha_frac": 0.6826923077, "autogenerated": false, "ratio": 3.257831325301205, "config_test": false, "...
""" Program to truncate a data file to a QM system Part of ComQum-ELBA """ import argparse from collections import namedtuple import numpy as np from sgenlib import lammps def _trunc_connectivity(conlist, atom_ids) : newlist = [] for con in conlist: keep = False for atom in con.atoms : ...
{ "repo_name": "SGenheden/Scripts", "path": "Lammps/lmp_truncate.py", "copies": "1", "size": "1597", "license": "mit", "hash": -4740937743387259000, "line_mean": 28.5740740741, "line_max": 89, "alpha_frac": 0.6418284283, "autogenerated": false, "ratio": 3.5176211453744495, "config_test": false, ...
""" Routines and classes to read in output files from umbrella sampling, execute weighted histogram analysis method (WHAM) and calculate the PMF along a 1D reaction coordinate """ import os import tempfile import shutil import subprocess import numpy as np import numpy.random as random import matplotlib.pylab as plt...
{ "repo_name": "SGenheden/Scripts", "path": "Membrane/wham.py", "copies": "1", "size": "34313", "license": "mit", "hash": 2597730237943106600, "line_mean": 29.4193262411, "line_max": 172, "alpha_frac": 0.6281875674, "autogenerated": false, "ratio": 3.3178302069232255, "config_test": false, "ha...
""" Routines to fit structures """ import math import sys import numpy as np def dofit(ref,mob,xyz) : """ Performing fitting of mobile coordinates on top of references coordinates and then move a full set of coordinates Parameters ---------- ref : numpy.ndarray the reference coordinates mob : ...
{ "repo_name": "SGenheden/Scripts", "path": "sgenlib/fitting.py", "copies": "1", "size": "4276", "license": "mit", "hash": -3347773446667497500, "line_mean": 24.9151515152, "line_max": 113, "alpha_frac": 0.6078110384, "autogenerated": false, "ratio": 2.593086719223772, "config_test": false, "h...
""" Routines to geometrical calculations """ import math import numpy as np def sphere_surf_rand(): u1 = 100 u2 = 1000 while u1*u1 + u2*u2 >= 1 : u1 = np.random.uniform(low=-1,high=1) u2 = np.random.uniform(low=-1,high=1) x = 2*u1*np.sqrt(1-u1*u1-u2*u2) y = 2*u2*np.sqrt(1-u1*u1-u2*u2) z = 1 - 2...
{ "repo_name": "SGenheden/Scripts", "path": "sgenlib/geo.py", "copies": "1", "size": "9926", "license": "mit", "hash": -9035210773981671000, "line_mean": 24.8489583333, "line_max": 117, "alpha_frac": 0.5515817046, "autogenerated": false, "ratio": 2.4370243064080532, "config_test": false, "has_...
""" Routines to manipulate with SMILES """ import urllib class RetrieveSmilesException(Exception): pass def _get_cactus(smiles): """ Convert SMILES using Cactus service Parameters ---------- smiles : string the SMILES string Returns ------- string the path to the do...
{ "repo_name": "SGenheden/Scripts", "path": "sgenlib/smiles.py", "copies": "1", "size": "4349", "license": "mit", "hash": 7298305725338298000, "line_mean": 26.18125, "line_max": 231, "alpha_frac": 0.5730052886, "autogenerated": false, "ratio": 3.8384819064430715, "config_test": false, "has_no_...
""" Routines to modify coordinates in periodic boxes. Only works with rectangular geometries. """ import numpy as np def unwrap_vector(dr,box): """ Unwraps a vector """ dr = np.divide(dr,box) dr = np.around(dr) return np.multiply(box,dr) def make_whole(atoms,box) : """ Make a set of ...
{ "repo_name": "SGenheden/Scripts", "path": "sgenlib/pbc.py", "copies": "1", "size": "3156", "license": "mit", "hash": -3010928282034238500, "line_mean": 25.0826446281, "line_max": 81, "alpha_frac": 0.5918884664, "autogenerated": false, "ratio": 3.495016611295681, "config_test": false, "has_no...
""" Routines to parse files and streams """ import fileinput import re import numpy as np from units import * def stdin2ndarray() : """ Parse columns and rows of data from standard input into a numpy.ndarray """ data = [] for line in fileinput.input() : if line[0] not in ["#","@"] : ...
{ "repo_name": "SGenheden/Scripts", "path": "sgenlib/parsing.py", "copies": "1", "size": "9364", "license": "mit", "hash": -6567313935266222000, "line_mean": 28.5394321767, "line_max": 103, "alpha_frac": 0.579880393, "autogenerated": false, "ratio": 3.7188244638602064, "config_test": false, "h...
""" Routines to perform analysis on series """ import numpy as np from scipy.stats import spearmanr def find_equilibration(x,y,atleast=50,threshold=0.05,nperm=0) : """ Find the equilibration time of a data series Parameters ---------- x : Numpy array the x data y : Numpy array the y data atlea...
{ "repo_name": "SGenheden/Scripts", "path": "sgenlib/series.py", "copies": "1", "size": "2106", "license": "mit", "hash": 9046315538647219000, "line_mean": 25.325, "line_max": 89, "alpha_frac": 0.5740740741, "autogenerated": false, "ratio": 3.391304347826087, "config_test": false, "has_no_keyw...
""" Scripts used to convert the provided all-atom system input in Lammps format to a hybrid description. The solute is retained as all-atom, whereas the solvent molecules are made into CG. The script creates the following files: 1) A PDB-file for the solute 2) A Lammps datafile for the solute, include force field par...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Sampl5/convert_aa.py", "copies": "1", "size": "7344", "license": "mit", "hash": 2809168107841235000, "line_mean": 33.4788732394, "line_max": 98, "alpha_frac": 0.6209150327, "autogenerated": false, "ratio": 3.287376902417189, "config_test": fa...
""" Script to calculate PMF properties, i.e. penetration and water/lipid barriers """ import sys import numpy as np from scipy.interpolate import interp1d from sgenlib import parsing from sgenlib import snum data = parsing.parse2ndarray(sys.argv[1]) x = data[:,0] pmf = data[:,1] err = data[:,2] mini = np.argmin(p...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Liposome/calc_pmf_prop_mem.py", "copies": "1", "size": "1536", "license": "mit", "hash": -534936717331833860, "line_mean": 25.9473684211, "line_max": 84, "alpha_frac": 0.62109375, "autogenerated": false, "ratio": 2.3343465045592704, "config_t...
""" Script to calculate PMF properties, i.e. penetration and water/lipid barriers """ import sys import numpy as np from sgenlib import parsing data = parsing.parse2ndarray(sys.argv[1]) x = data[:,0] pmf = data[:,1] err = data[:,2] l = data.shape[0] imid = int(np.floor(0.5*l)) ifourth = int(np.floor(0.25*l)) dt =...
{ "repo_name": "SGenheden/Scripts", "path": "Projects/Liposome/calc_pmf_prop.py", "copies": "1", "size": "1483", "license": "mit", "hash": 4738127159494352000, "line_mean": 29.8958333333, "line_max": 77, "alpha_frac": 0.6345246123, "autogenerated": false, "ratio": 2.5926573426573425, "config_tes...