GithubHelp home page GithubHelp logo

hailiangzhang / zazmol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madscatt/zazmol

0.0 1.0 0.0 21.42 MB

Library for defining molecular objects to create simulation and analysis programs To install: python setup.py install dependencies: numpy, mocker

License: GNU General Public License v3.0

Shell 0.03% Python 51.68% HTML 14.60% Jupyter Notebook 0.24% Makefile 0.46% C 32.58% Fortran 0.09% Forth 0.05% C++ 0.22% Perl 0.05%

zazmol's Introduction

ZAZMOL

======

This is the unstable developer branch of sasmol

Library for defining molecular objects to create simulation and analysis programs

To install:

python setup.py install

dependencies:

numpy, mocker



import sasmol.system as system
molecule = system.Molecule('hiv1_gag.pdb')
reading filename:  hiv1_gag.pdb
num_atoms =  6730
>>> found  1  model(s) or frame(s)
finished reading frame =  1
molecule.natoms()
6730
molecule.number_of_frames()
1
frame = 0
molecule.calculate_center_of_mass(frame)
array([ -6.79114736, -23.71577133,   8.06558513])
molecule.translate(frame,[88.3, 19.6, 14.7],point=True)
molecule.calculate_center_of_mass(frame)
array([ 88.3,  19.6,  14.7])
molecule.rotate(frame,'x',45*3.1515927/180.0)
molecule.calculate_center_of_mass(frame)
array([ 88.3       ,   3.40417778,  24.26234889])
molecule.calculate_principle_moments_of_inertia(frame)
(array([  1.30834716e+07,   1.91993314e+08,   1.85015201e+08]),
 array([[-0.08711655, -0.97104917,  0.22242802],
        [-0.9670572 ,  0.13604234,  0.21515775],
        [ 0.23918838,  0.19635682,  0.95091162]]),
 array([[  1.90290278e+08,  -1.54065145e+07,   2.25205595e+06],
        [ -1.54065145e+07,   2.43538600e+07,   3.99557354e+07],
        [  2.25205595e+06,   3.99557354e+07,   1.75447849e+08]]))
molecule.write_pdb('rotated_hiv1_gag.pdb',frame,'w');

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.