Código para insertar un página en otra con html5.
How to install Python 2.7 as an additional kernel next to the default Python 3.X one?
# install everything (except JupyterHub itself) with Python 2 and 3. Jupyter is included in Anaconda. conda create -n py3 python=3 anaconda conda create -n py2 python=2 anaconda # register py2 kernel source activate py2 ipython kernel install # same for py3, and install juptyerhub in the py3 env source activate py3 ipython kernel install pip install jupyterhub
PyMol --> Cambiar nombre de una cadena/residuo de una proteína
select the chain for which you wish to add/alter the chain id # make sure that the selecting state (on the bottom right side) is on chains type the command: alter (chain A),chain='B' # This will alter the chain id to B, if you want another id change the command accordingly type the command: alter (sele),resn='INH' # This will alter the residue id to INH, if you want another id change the command accordingly type the command: sort
PyMol --> Seleccionar el atom ID 4557 del obj01
select 4557, obj01 and id 4557
PyMol --> Renumber the amino acids in a protein, so that it starts from 0 instead of its offset as defined in the structure file
alter (all),resi=str(int(resi)+100) # it starts from 100 alter (all),resi=str(int(resi)-7) # it starts from -7 # refresh (turn on seq_view to see what this command does). sort
SLURN --> JOB DEPENDENCIES
To start the workflow, submit Job A first:
[jant.encinar@castleblack ~]$ sbatch _957.sbatch Submitted batch job 69023
Now submit _788 and _605, using the job id from Job _957 to indicate the dependency:
[jant.encinar@castleblack ~]$ sbatch -d after:69023 _788.sbatch Submitted batch job 69024 [jant.encinar@castleblack ~]$ sbatch -d after:69023 _605.sbatch Submitted batch job 69025 #SBATCH --dependency=after:69023
#!/bin/bash #SBATCH --job-name={{variable1}} #SBATCH --mem=2GB #SBATCH --cpus-per-task=56 #SBATCH --partition=albaicin #SBATCH --error=/LUSTRE/home/CTS164/jant.encinar.umh.es/runDC/COP1-03AC1565/{{variable2}}/err%j.err #SBATCH --output=/LUSTRE/home/CTS164/jant.encinar.umh.es/runDC/COP1-03AC1565/{{variable2}}/out%j.out /LUSTRE/home/CTS164/jant.encinar.umh.es/yasara-22.5.22/yasara -txt /LUSTRE/home/CTS164/jant.encinar.umh.es/runDC/COP1-03AC1565/_sbatch-ALB/_dock_runscreening-22.5.22.mcr "MacroTarget='/LUSTRE/home/CTS164/jant.encinar.umh.es/runDC/COP1-03AC1565/{{variable2}}/{{variable3}}'" cd /LUSTRE/home/CTS164/jant.encinar.umh.es/runDC/COP1-03AC1565/{{variable2}}/ cp {{variable2}}.log /LUSTRE/home/CTS164/jant.encinar.umh.es/runDC/COP1-03AC1565/_all-logs/
SLURN --> squeue jobs
squeue -u nrf24ad3 -ao "%.14i %.10u %.8j %.3C %.5m %.6b %.6Q %.5q %.10M %.7T %.15R %E" $* squeue -u jant.encinar --sort=+j #sort by the job-name (given by #SBATCH --job-name XXX) rm *.err *.out *.adr *clean.sce *_bestposes.pdb *_bestposes.sdf *_checkpoint.sce
Listar , desde la linea de comandos, los archivos *.out con el comando find y después borrarlos.
find . -name "*.out" -type f
find . -name "*.out" -type f -delete
YASARA files --> delete useless YASARA's docking files
rm *.adr *clean.sce *_checkpoint.sce *_bestposes.pdb *_bestposes.sdf *_ligands.sdf
ls Linux Display or list all directories in Unix
ls -d */
YASARA files --> delete all selected files
rm *.mcr *.tab *.yob *.png *.txt *.html *last.pdb *last.sce *average.pdb *min.pdb *min.sce *_dccm.sce *.job *.sbatch
Nombre de hoja Excel --> función para incluir en una celda (en el ejemplo la celda A1 y poder operar de forma lógica con ella) el nombre de cada hoja de un libro Excel.
=DERECHA(CELDA("nombrearchivo",A1),LARGO(CELDA("nombrearchivo",A1))-HALLAR("]",CELDA("nombrearchivo",A1)))
Pymol --> calcula una orientación determinada,
PyMOL>get_view ### cut below here and paste into script ### set_view (\ 0.387747556, -0.530695796, -0.753665924,\ -0.785253763, 0.238018751, -0.571598351,\ 0.482731193, 0.813453972, -0.324439615,\ 0.000000000, 0.000000000, -285.253662109,\ 41.038238525, -12.994083405, 29.010128021,\ 224.896163940, 345.611175537, -20.000000000 ) ### cut above here and paste into script ###
Pymol --> repite una orientación determinada,
PyMOL>set_view (\ 0.387747556, -0.530695796, -0.753665924,\ -0.785253763, 0.238018751, -0.571598351,\ 0.482731193, 0.813453972, -0.324439615,\ 0.000000000, 0.000000000, -285.253662109,\ 41.038238525, -12.994083405, 29.010128021,\ 224.896163940, 345.611175537, -20.000000000 )
Pymol --> selecciona los aminoácidos 15, 356, 398, 425, 430, 447, 448, 450, 451, 480, 481, 490
sele resi 15+356+398+425+430+447+448+450+451+480+481+490
Pymol --> Corte plano de una estructura y color gris del plano de corte
fraction = 0.42 view = cmd.get_view() near_dist = fraction*(view[16]-view[15]) far_dist = (view[16]-view[15]) - near_dist cmd.clip("near", -near_dist) # render opaque background image as surface set ray_interior_color, grey60 set opaque_background set surface_color, white ray
Pymol --> selecciona todas las prolinas,
sel arginines, resn arg select resi 91 and resn Met and chain K
Pymol --> combina los PR01 y obj01 en un nuevo objeto llamado Pro1-B03-RS:
create Pro1-B03-RS, PR01 + obj01
Pymol --> selecciona los aa a menos de 5 A del aa 142,
select near142, resi 142 around 5
Pymol --> selecciona todos los átomos de fosforo
select fosforo, name p
Pymol --> tamaño de la leyenda,
set label_size, 22 set label_position,(-2,2,1) set label_color, orange, object
Pymol --> localización de la leyenda,
set label_position,(3,2,1) Offsets the labels 3 Å in X, 2 in Y and 1 in Z, relative to the Viewport.
INTRANET --> localización de unidades de red
\\eparadorw01.umhnet.es\shaker$ \\discodered.umhnet.es\jant.encinar
Pymol --> transparencia al 50% del objeto "obj01",
set transparency:0.5, obj01
Pymol --> Pair fit.
# superimpose protA residues 10-25 and 33-46 to protB residues 22-37 and 41-54: pair_fit protA///10-25+33-46/CA, protB///22-37+41-54/CA # superimpose ligA atoms C1, C2, and C4 to ligB atoms C8, C4, and C10, respectively: pair_fit ligA////C1, ligB////C8, ligA////C2, ligB////C4, ligA////C3, ligB////C10
Pymol --> Run InterfaceResidues.py
1.- Open PDB file
2.- File -> Run -> InterfaceResidues.py
3.- Enter the comman line:
interfaceResidue MD2020-2059-MERS-compl-mod1, chain G, chain F
MD2020-2059-MERS-compl-mod1 -> name of object
chain G, chain F -> chain ID of two chain
Some examples for downloading PDBs from RCBS
Once downloaded, make sure the script has execution permission: chmod
+x batch_download.sh
Obtain full help on the batch download shell script at the command line with: ./batch_download.sh
-h
In the examples below it is assumed that the file list_file.txt
is
a plain text file that contains a comma separated list of PDB ids.
./batch_download.sh -f list_file.txt -p
./batch_download.sh -f list_file.txt -c
./batch_download.sh -f list_file.txt -c -p -s
Download PDBs from RCBS --> list_file.txt
#!/bin/bash # Script to download files from RCSB http file download services. # 1LD2,2W96,2W99,2W9F,2W9Z,3G33,5FWK,5FWL,5FWM,5FWP,6P8E,6P8F,6P8G,6P8H # Use the -h switch to get help on usage. if ! command -v curl &> /dev/null then echo "'curl' could not be found. You need to install 'curl' for this script to work." exit 1 fi PROGNAME=$0 BASE_URL="https://files.rcsb.org/download" usage() { cat << EOF >&2 Usage: $PROGNAME -f[-o ] [-c] [-p] -f : the input file containing a comma-separated list of PDB ids -o : the output dir, default: current dir -c : download a cif.gz file for each PDB id -p : download a pdb.gz file for each PDB id -x : download a xml.gz file for each PDB id -s : download a sf.cif.gz file for each PDB id (diffraction only) -m : download a mr.gz file for each PDB id (NMR only) -r : download a mr.str.gz for each PDB id (NMR only) EOF exit 1 } download() { url="$BASE_URL/$1" out=$2/$1 echo "Downloading $url to $out" curl -s -f $url -o $out || echo "Failed to download $url" } listfile="" outdir="." cif=false pdb=false xml=false sf=false mr=false mrstr=false while getopts f:o:cpxsmr o do case $o in (f) listfile=$OPTARG;; (o) outdir=$OPTARG;; (c) cif=true;; (p) pdb=true;; (x) xml=true;; (s) sf=true;; (m) mr=true;; (r) mrstr=true;; (*) usage esac done shift "$((OPTIND - 1))" if [ "$listfile" == "" ] then echo "Parameter -f must be provided" exit 1 fi contents=$(cat $listfile) # see https://stackoverflow.com/questions/918886/how-do-i-split-a-string-on-a-delimiter-in-bash#tab-top IFS=',' read -ra tokens <<< "$contents" for token in "${tokens[@]}" do if [ "$cif" == true ] then download ${token}.cif.gz $outdir fi if [ "$pdb" == true ] then download ${token}.pdb.gz $outdir fi if [ "$xml" == true ] then download ${token}.xml.gz $outdir fi if [ "$sf" == true ] then download ${token}-sf.cif.gz $outdir fi if [ "$mr" == true ] then download ${token}.mr.gz $outdir fi if [ "$mrstr" == true ] then download ${token}_mr.str.gz $outdir fi done
Registro del sistema: HKEY _ LOCAL _ MACHINE / SOFTWARE / Microsoft / Windows NT / CurrentVersion / SoftwareProtectionPlatform y en lista de variables buscamos "BackupProductKeyDefault". Clave de instalación de Windows 10.
crontab -e
: editar. ctrl+i: insertar contenido, ":wq"; escribir/guardar y salir (write & quit).
crontab -r
: borrar.
crontab -l
: comprobar un crontab programado.
I ran crontab -e and made some changes, now how do I save it?. That depends on the editor you run. contab -e
uses
the editor specified in the environment variable $EDITOR
.
Most probably it's vi
or nano
.
vi
, to enter the text you have to put vi
in insert by pressing "i
" or "a
" after which you can add the text and whatever is being type will be seen on the screen, and press esc to switch to the
command mode, then type :wq
to write (w) and quit
(q).nano
press ctrl+x,
then press y for yes and provide a filename before
pressing Enter.Example: 40 20 25 09 * /usr/bin/python /home/jant/2vbc/_gensbatchs.py min hor dia mes año /path/program /path/script
mv old-folder-name new-folder-name
mv /path/to/old /path/to/new
Ejecuta el siguiente comando desde la consola y dentro del directorio en el que quieras contar esos ficheros. En el ejemplo contarás los ficheros *.docked.pdbqt
find -type f -name '*.docked.pdbqt' | wc -l
Memoria libre en cada nodo, para SGE.
qstat -f -u '*' -F mem_free
Cuando quieres listar el contenido de un directorio donde existen muchos ficheros y con ls aparece el argumento "Argument list too long". La solución está en el siguiente comando que has de modificar en función del /directorio y el tipo de archivo a buscar, en mi caso ".docked.pdbqt". Generará el fichero lista-hechos.txt... ¡mano de santo!
find /directorio -name "*.docked.pdbqt" >/directorio/lista-hechos.txt
find -type f -name '*.docked.pdbqt' >lista-hechos.txt
Jobs en array que deben usar 2 CPUs.
#!/bin/bash #$ -cwd #$ -N crp1b09 #$ -o o.1b09 #$ -e e.1b09 #$ -pe shm.pe 2 <------- #$ -S /bin/bash #$ -t 1-16482 cd /home/jant/CRP/1b09/ IDLIG=`python _getidligands.py /home/jant/CRP/1b09/_lista.16482.txt $SGE_TASK_ID` lenid=${#IDLIG} IDLIGAND=${IDLIG:0:lenid-1} /home/jant/autodock_vina_1_1_2_linux_x86/bin/vina --config /home/jant/CRP/1b09/vina_config_files/$IDLIGAND.vina_config.txt --log /home/jant/CRP/1b09/docked-log/$IDLIGAND.log --cpu 2
Ejecuta el siguiente comando desde la consola y dentro del directorio en el que quieras borrar esos ficheros. En el ejemplo contarás los ficheros *.docked.pdbqt
find . -name "*.docked.pdbqt" -print0 | xargs -0 rm
Tamaño en Megas
du -sm * | sort -nr | head -N
Tamaño en Gigas
du -hs * | sort -nr | head -N
The output of the "ls" command depends on the version of "ls", the options used, the platform used, etc. It appears from your example that you're using it from a typical un*x (such as Linux), and probably using a typical modern "ls" version. In which case:
-rwxrw-r-- 10 root root 2048 Jan 13 07:11 afile.exe ?UUUGGGOOOS 00 UUUUUU GGGGGG #### ^-- date stamp and file name are obvious ;-) ^ ^ ^ ^ ^ ^ ^ ^ ^ | | | | | | | | \--- File Size | | | | | | | \-------- Group Name (for example, Users, Administrators, etc) | | | | | | \--------------- Owner Acct | | | | | \---------------------- Link count (what constitutes a "link" here varies) | | | | \--------------------------- Alternative Access (blank means none defined, anything else varies) | \--\--\----------------------------- Read, Write and Special access modes for [U]ser, [G]roup, and [O]thers (everyone else) \------------------------------------- File type flag
Generamos la lista con el nombre de los ficheros a copiar dispuestos en columna.
import sys import fileinput import os ,shutil diroutsh='./' namelista=sys.argv[1] file = open(namelista, 'r') filestr=file.read() vecfile=filestr.split('\r\n') print len(vecfile) for fileele in vecfile: if os.path.exists(diroutsh+'folder_origen/'+fileele+'.log'): shutil.copy(diroutsh+'folder_origen/'+fileele+'.log', diroutsh+'folder_destino/'+fileele+'.log') #print "copied:",fileele+'.log'
EJECUCIÓN: python script_name.py list.txt
https://openbabel.org/docs/dev/Command-line_tools/babel.html "C:\Program Files (x86)\ChemAxon\MarvinBeans\bin\molconvert" mol2 D:\encinar\chemical-libraries\19-2_drug_bank\_3Dstructures.sdf -o D:\encinar\chemical-libraries\19-2_drug_bank\drug.mol2 -m -g -F
ren drug1.mol2 DB00114-1051.mol2
C:\OpenBabel-2.4.1\obabel.exe D:\encinar\chemical-libraries\19-2_drug_bank\mol2\DB00114-1051.mol2 -O D:\encinar\chemical-libraries\19-2_drug_bank\pdbqt-pH74\DB00114-1051.pdbqt -xh --gen3d -p 7.4
find -type f -name '*.pdbqt' >/SCRATCH/CTS164/jant.encinar.umh.es/vina/_lista-pdbqt-596240-SN-ZINC-PE-DB.txt