Where are you on here?
Query used on Google's BigQuery with GitHubArchive Data
SELECT actor.login as user, COUNT(*) as total FROM (| """calculate RMSD for two proteins with different topologies""" | |
| from pytraj import io as mdio | |
| # create trajectory objects (having frames) | |
| traj_0 = mdio.load("../tests/data/Tc5b.crd", "../tests/data/Tc5b.top") | |
| traj_1 = mdio.load("../tests/data/ala3.dcd", "../tests/data/ala3.psf") | |
| # get new traj objects with given mask | |
| traj_0_new = traj_0[":8-10@CA :frame"] |
| # distutils: language = c++ | |
| cdef cppclass A: | |
| void c_test(): | |
| print ("hello from A") | |
| cdef cppclass B(A): | |
| void SetObject(A* ptr): | |
| print ("dummy method, hello from B") | |
| cdef class pyA: |
| cdef class MyTest (object): | |
| cdef public object _x | |
| def __cinit__(self): | |
| self._x = 0 | |
| @property | |
| def x(self): | |
| return self._x | |
| @x.setter |
| # test get reference Frame from DataSetList | |
| traj = mdio.load("./data/md1_prod.Tc5b.x", "./data/Tc5b.top") | |
| dslist = DataSetList() | |
| dslist.add_set("ref_frame", "myname") | |
| dslist[0].top = traj.top.copy() | |
| # use last Frame for reference | |
| dslist[0].append(traj[-1]) | |
| # dslist.get_reference_frame("myname") |
| Traceback (most recent call last): | |
| File "/home/hainm/anaconda3/envs/python2/bin/cython", line 9, in <module> | |
| load_entry_point('Cython==0.23.dev0', 'console_scripts', 'cython')() | |
| File "/home/hainm/anaconda3/envs/python2/lib/python2.7/site-packages/Cython-0.23.dev0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 676, in setuptools_main | |
| return main(command_line = 1) | |
| File "/home/hainm/anaconda3/envs/python2/lib/python2.7/site-packages/Cython-0.23.dev0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 693, in main | |
| result = compile(sources, options) | |
| File "/home/hainm/anaconda3/envs/python2/lib/python2.7/site-packages/Cython-0.23.dev0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 668, in compile | |
| return compile_multiple(source, options) | |
| File "/home/hainm/anaconda3/envs/python2/lib/python2.7/site-packages/Cython-0.23.dev0-py2.7-linux-x86_64.egg/Cython/Compiler/Main.py", line 646, in compile_multiple |
| CPPTRAJ: Trajectory Analysis. V16.00b | |
| ___ ___ ___ ___ | |
| | \/ | \/ | \/ | | |
| _|_/\_|_/\_|_/\_|_ | |
| | Date/time: 08/05/15 16:30:04 | |
| | Available memory: 132.562 MB | |
| INPUT: Reading Input from file dih.in | |
| [parm G5.pdb] |
| $ pip install https://github.com/ParmEd/ParmEd/archive/2.0.5.tar.gz | |
| Collecting https://github.com/ParmEd/ParmEd/archive/2.0.5.tar.gz | |
| Downloading https://github.com/ParmEd/ParmEd/archive/2.0.5.tar.gz | |
| | 32.0MB 12.1MB/s | |
| Installing collected packages: ParmEd | |
| Found existing installation: ParmEd 2.3.2 | |
| Uninstalling ParmEd-2.3.2: | |
| Successfully uninstalled ParmEd-2.3.2 | |
| Running setup.py install for ParmEd ... done | |
| Successfully installed ParmEd-2.3.2 |
| import pytraj as pt | |
| import numpy as np | |
| traj = pt.iterload('tz2.nc', 'tz2.parm7') | |
| # note: use pt.load method if your trajectory is fit well to memory | |
| c0 = pt.center_of_mass(traj, ':1-3') | |
| c1 = pt.center_of_mass(traj, ':4-7') | |
| c2 = pt.center_of_mass(traj, ':8-10') | |
| c3 = pt.center_of_mass(traj, ':11-13') |
| # Q: [AMBER] Working with pytraj | |
| # use all atoms in residue 1 | |
| c_o_G = pt.center_of_geometry(traj, mask=':1') | |
| # or | |
| # use given atoms in residue 1 | |
| c_o_G = pt.center_of_geometry(traj, mask=':1@C1,N6,C2,C4,N7') | |
| pt.vector.corrplane(traj, mask=':1@C1,N6,C2,C4,N7') |