Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
import json
import subprocess
import re
import math
import glob
from typing import List, Dict
from pathlib import Path
import shutil
Running ANTECHAMBER for residue HIS+HIS
Running ANTECHAMBER command: /usr/lib/ucsf-chimerax/bin/amber20/bin/antechamber -ek qm_theory='AM1', -i /tmp/tmpkkmik_9i/ante.in.mol2 -fi mol2 -o /tmp/tmpkkmik_9i/ante.out.mol2 -fo mol2 -c bcc -nc -6 -j 5 -s 2 -dr n
(HIS+HIS)
(HIS+HIS) ``
(HIS+HIS) ``
(HIS+HIS) Welcome to antechamber 20.0: molecular input file processor.
(HIS+HIS) `Welcome to antechamber 20.0: molecular input file processor.`
@philipmac
philipmac / gist:023b4389a1399f3ffa883bd0a22105ec
Created August 7, 2020 16:28
failed Prefect docker flow
Found 1 flow run(s) to submit for execution.
[2020-08-07 16:26:32,263] INFO - agent | Deploying flow run bf0ed60c-b0aa-4693-8bee-01d242ecc6f9
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out
$ docker logs tmp_graphql_1
Running Alembic migrations...
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
INFO [alembic.runtime.migration] Running upgrade -> 723da8052cbd, create extensions
INFO [alembic.runtime.migration] Running upgrade 723da8052cbd -> 2f249ccdcba7, set utc timezone
INFO [alembic.runtime.migration] Running upgrade 2f249ccdcba7 -> 7ff37edbf446, Initial migration
INFO [alembic.runtime.migration] Running upgrade 7ff37edbf446 -> 6c48e68b5e97, Add task run trigger
INFO [alembic.runtime.migration] Running upgrade 6c48e68b5e97 -> aa594a91210c, Add run timing details trigger
ubuntu@ip-172-31-13-94:~$ prefect server start
Pulling postgres ... done
Pulling hasura ... done
Pulling graphql ... done
Pulling apollo ... done
Pulling scheduler ... done
Pulling ui ... done
Creating network "prefect-server" with the default driver
Creating tmp_postgres_1 ... done
Creating tmp_hasura_1 ... done
@philipmac
philipmac / e_blast_run_3.txt
Created July 22, 2020 15:55
mods proj number -> proj ID
$ ./eblast_bins/elastic-blast3.8 submit --cfg test_eblast.ini --loglevel DEBUG
ERROR: The command "gcloud container clusters list --format=value(status) --filter name=macmenaminpe-elastic-blast" returned with exit code 1
ERROR: (gcloud.container.clusters.list) The required property [project] is not currently set.
You may set it for your current workspace by running:
$ gcloud config set project VALUE
or it can be set temporarily by the environment variable [CLOUDSDK_CORE_PROJECT]
@philipmac
philipmac / e_blast_run_2.txt
Created July 22, 2020 14:57
fixes bucket name; changes input to sane size
$ ./eblast_bins/elastic-blast3.8 submit --cfg test_eblast.ini --loglevel DEBUG
ERROR: The command "gcloud container clusters list --format=value(status) --filter name=macmenaminpe-elastic-blast" returned with exit code 1
ERROR: (gcloud.container.clusters.list) The required property [project] is not currently set.
You may set it for your current workspace by running:
$ gcloud config set project VALUE
or it can be set temporarily by the environment variable [CLOUDSDK_CORE_PROJECT]
$ cat test_eblast.ini
@philipmac
philipmac / gist:770da5ae2810c05879ab5569309d98a5
Created July 14, 2020 14:08
update prefect to 12.3 - rerun docker hello world
$ prefect agent start docker --show-flow-logs
____ __ _ _ _
| _ \ _ __ ___ / _| ___ ___| |_ / \ __ _ ___ _ __ | |_
| |_) | '__/ _ \ |_ / _ \/ __| __| / _ \ / _` |/ _ \ '_ \| __|
| __/| | | __/ _| __/ (__| |_ / ___ \ (_| | __/ | | | |_
|_| |_| \___|_| \___|\___|\__| /_/ \_\__, |\___|_| |_|\__|
|___/
[2020-07-14 14:05:26,125] INFO - agent | Starting DockerAgent with labels []
./df.py
/home/macmenaminpe/.local/lib/python3.8/site-packages/prefect/environments/storage/docker.py:335: UserWarning: This Docker storage object has no `registry_url`, and will not be pushed.
warnings.warn(
[2020-07-14 13:05:04] INFO - prefect.Docker | Building the flow's Docker storage...
Step 1/9 : FROM prefecthq/prefect:0.11.5-python3.8
---> 7a5491e306a6
Step 2/9 : RUN pip install pip --upgrade
---> Using cache
---> 3087f7250e81
[2020-07-14 13:05:59,767] INFO - agent | Found 1 flow run(s) to submit for execution.
[2020-07-14 13:05:59,805] INFO - agent | Deploying flow run 5d7685f3-9bce-493d-9bfe-7801b3b68772
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 159, in _new_conn
conn = connection.create_connection(
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/local/lib/python3.8/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
socket.timeout: timed out