Skip to content

Instantly share code, notes, and snippets.

View hainm's full-sized avatar

Hai Nguyen hainm

View GitHub Profile
amber/test/sanderapi ((no branch, rebasing master)) $ make
make[1]: Entering directory `/net/casegroupp/u1/haichit/amber_git/amber/test/sanderapi'
Creating the bad prmtop test.parm7
Testing the Fortran API
gfortran -I/home/haichit/amber_git/amber/include -L/home/haichit/amber_git/amber/lib test.F90 -o testf -lsander
Running testf
Checking proper treatment of a bad prmtop
ERROR: Flag "ATOM_NAME" not found in PARM file
PASSED
==============================================================
@hainm
hainm / Dockerfile
Last active November 17, 2016 03:42
FROM centos:5
ENV MINICONDA_URL https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
ENV MINICONDA_ROOT /root/miniconda3
RUN yum -y update
RUN yum -y install gcc \
patch \
csh \
flex \
import sander
import parmed
options = sander.pme_input()
options.cut = 8.0
options.ntr = 1
options.refc = '../ubiquitin/inpcrd'
options.restraintmask = '!:WAT'
options.restraint_wt = 1.
root_name=../../../files/vAla3/vAla3
phenix.refine $root_name.pdb\
$root_name.cif\
$root_name.mtz\
topology_file_name=$root_name.prmtop\
coordinate_file_name=$root_name.rst7\
use_amber=True \
wxc_scale=0.025 \
--overwrite \
amber.restraint_wt=1.\
Error compiling Cython file:
------------------------------------------------------------
...
cdef BondArray bondarray, bondarray_h
cdef BondType btype = BondType()
bondarray = self.thisptr.Bonds()
bondarray_h = self.thisptr.BondsH()
bondarray.insert(bondarray.end(), bondarray_h.begin(), bondarray_h.end())
import os
import subprocess
import amber_adaptbx
test_path = os.path.dirname(amber_adaptbx.__file__) + '/tests'
# test.fast
command = [
'phenix.python',
'-m',
import parmed as pmd
import sander
# make default pme input
inp = sander.pme_input()
parm_file = '../ubiquitin/prmtop'
rst7_file = '../ubiquitin/restrt.save'
parm = pmd.load_file(parm_file, rst7_file)
import parmed as pmd
parm = pmd.load_file("old.parm7")
# suppose your H is 1st atom
atom = parm.atoms[0]
# add you stuff here
atom.name =
atom.type =
atom.atomic_number =
atom.charge =
parm.save('new.parm7')
define([
'jquery',
'base/js/namespace',
'base/js/events'
], function (
$,
IPython,
events
) {
var run_all_cells = function(){
import pytraj as pt
from pytraj.core.c_core import Command
from pytraj import CpptrajState
# data is DatasetGridFloat
data = pt.io.read_data('fav8.guv.O.1.ccp4',
options='name MyCcp4')[0]
state = CpptrajState()