Repository navigation
Expand file tree
/
Copy pathparams.json
More file actions
1 lines (1 loc) · 20.7 KB
/
Copy pathparams.json
File metadata and controls
1 lines (1 loc) · 20.7 KB
1
{"name":"JamesGowdy.github.io","tagline":"","body":"### Biophysics lab notes\r\n\r\nThe notebooks in this repository are meant as notes on topics relevant to my PhD either:\r\n\r\n* Directly such as the crystallography, FT, eigenvalues of rotation and data reduction topics \r\n* Or indirectly as topics mentioned/assumed in litature which I have read in an attempt to answer research questions\r\n\r\nThey can be rendered online using nbviewer by clicking the links provided below or alternatively they can be downloaded from the repository homepage and run/edited locally with ipython using the notebook option. \r\n\r\n* Series and transforms stuff\r\n * [Taylor series expansion and series convergence conditions](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/series.ipynb)\r\n * [Fourier series and Fourier synthesis](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/fourierseries.ipynb)\r\n* Linear Algebra/ Numerical analysis\r\n * [Determinant calculation and matrix inversion with symbolic algebra](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/inverse.ipynb)\r\n * [Gauss-Jordan elimination, Gaussian elimination, LU decomposition, Gauss-Seidel, Jacobi method](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/gaussjordan_gaussian_LU.ipynb)\r\n * [Eigenvectors and eigenvalues](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/eigen.ipynb)\r\n * [Vector projections and Gram Schmidt orthogonalisation](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/gramschmidt.ipynb)\r\n * [QR decomposition, Householder reductions, Givens transformations](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/QR.ipynb)\r\n* [Mathematical optimisation](https://github.com/jamesgowdy/biophys/blob/master/optimise.md)\r\n * [Simplex, two-phase simplex, and 'big M' simplex method](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/simplex.ipynb)\r\n * [Least squares and nD polynomial regression](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/leastsquares.ipynb)\r\n * [Gradient descent](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/gradientdescent.ipynb)\r\n * [Conjugate and biconjugate gradient method](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/conjugatedescent.ipynb)\r\n * [Lagrange multipliers and stationary points of multivariate functions](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/lagrangemult.ipynb)\r\n * [Newton-Raphson vs. Gauss-Newton vs. Levenberg-Marquardt](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/levenberg_marquardt.ipynb)\r\n* Dimensionality reduction and machine learning\r\n * [SVD - unfinished](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/SVD.ipynb)\r\n * [PCA - unfinished](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/PCA.ipynb)\r\n* Basic I/O functionality\r\n * [Basic mmCIF input/output](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/mmcif_io.ipynb)\r\n * [Basic PDB input/output](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/pdb_io.ipynb)\r\n * [Basic DCD input/output and RMSD calculations](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/dcd_io.ipynb)\r\n* Crystallography\r\n * [Structure factor calculation by direct summation](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/sf_directsum.ipynb)\r\n * [Structure factor calculation in CCTBX explained](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/sf_cctbx.ipynb)\r\n * [Density sampling](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/density_sampling.ipynb)\r\n * [The reciprocal lattice and metric tensor](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/recip_latt.ipynb)\r\n * [Point group, space group and reciprocal space symmertry](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/recip_sym.ipynb)\r\n * [DRAFT: Intuition of structure factors as projections of 1D electron density](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/sf_1d.ipynb)\r\n * [DRAFT: Investigating 'signature reflections' using a 1D toy system](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/sf_1d_subseries.ipynb)\r\n * [How to import CCTBX in iPython](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/cctbx.ipynb)\r\n * [How to install Soleil's FoxTrot](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/foxtrot.ipynb)\r\n* Physics\r\n * [The nD plane wave](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/waveequation.ipynb)\r\n * [Random walks and demonstration of N<sup>1/2</sup> scaling - unfinished](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/polymer1.ipynb)\r\n * [Theoretical polymer models - unfinished](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/polymer2.ipynb)\r\n * [Normal modes - unfinished](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/normalmodes.ipynb)\r\n* Other random mathsy notes\r\n * [Single variable differential calculus](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/calculus.ipynb)\r\n * [Multivariate (vector and partial) differential calculus](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/veccalculus.ipynb)\r\n * [List of integrals and trigonometric identities](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/integrals.ipynb)\r\n* Biochemistry\r\n * [Buffer component calculations](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/buffer_calc.ipynb)\r\n * [Calculation of molar extinction coefficents for proteins](http://nbviewer.ipython.org/github/jamesgowdy/biophys/blob/master/protoparam.ipynb)\r\n\r\n### Python standard library examples\r\n\r\nAfter having rewritten a program several times after finding more elegant ways to do the same thing, I decided it would be a worthwhile investment to properly explore the full standard library. I have therefore written these scripts as short how-to examples/recipes/demos/reference notes for myself on modules in the standard library. All code is my own.\r\n\r\n* C/C++ python extensions (python-dev should be installed)\r\n * [distutils](https://github.com/jamesgowdy/examples/blob/master/run_setup.py): my wrapper to build library files via a templated script which executes distutil setup functionality\r\n * [distutils (basic)](https://github.com/jamesgowdy/examples/blob/master/distutils_example.py): basic c/c++ python extension library building functionality\r\n * [api_example.c](https://github.com/jamesgowdy/examples/blob/master/api_example.c): simple importable (wrapped) c functions, dynamic memory allocolation, reference counting\r\n* GUI programming with Tkinter\r\n * [Tkinter 1](https://github.com/jamesgowdy/examples/blob/master/tkinter_example.py): 3 very basic GUIs, Labels, fonts, images; Frames; Buttons; binding event handlers to widgets and messages, use PIL for images\r\n * [Tkinter 2](https://github.com/jamesgowdy/examples/blob/master/tkinter_example2.py): Menus, toolbars, statusbars, dialog, and data input\r\n * [Tkinter 3](https://github.com/jamesgowdy/examples/blob/master/tkinter_example3.py): File opening/saving dialog, hack to suppress an error message on mac\r\n * [Tkinter 4](https://github.com/jamesgowdy/examples/blob/master/tkinter_example4.py): Bitmap buttons, custom LargeTextButton widget class\r\n * [Tkinter 5](https://github.com/jamesgowdy/examples/blob/master/tkinter_example5.py): Top level/ pop-up windows, nested event loops\r\n * [Tkinter 6](https://github.com/jamesgowdy/examples/blob/master/tkinter_example5.py): Gridded widgets (calculator app)\r\n * [Tkinter 7](https://github.com/jamesgowdy/examples/blob/master/tkinter_example7.py): Checkbutton widgets (text2int app)\r\n * [Tkinter 8](https://github.com/jamesgowdy/examples/blob/master/tkinter_example8.py): Radiobutton widgets, with shared variables (text2int app)\r\n * [Tkinter 9](https://github.com/jamesgowdy/examples/blob/master/tkinter_example9.py): Canvas widgets\r\n * [Tkinter 10](https://github.com/jamesgowdy/examples/blob/master/tkinter_example10.py): Drag and drop canvas\r\n * [Tkinter 11](https://github.com/jamesgowdy/examples/blob/master/tkinter_example11.py): Text widget, (web reader app)\r\n * [Tkinter 12](https://github.com/jamesgowdy/examples/blob/master/tkinter_example12.py): LabelFrame, Scrollbar, Listbox widget & self updating/auto recall\r\n * [Tkinter 13](https://github.com/jamesgowdy/examples/blob/master/tkinter_example13.py): Scrollbar and setting window size\r\n * [ttk 1](https://github.com/jamesgowdy/examples/blob/master/ttk_example.py): Progressbar widgets and auto recall\r\n * [ttk 2](https://github.com/jamesgowdy/examples/blob/master/ttk_example.py): Treeview (file system reader app) \r\n * [ttk 3](https://github.com/jamesgowdy/examples/blob/master/ttk_example.py): Notebook, hack to get scrollbar to work in tabs (ScrollCanvasPage class)\r\n Note: Use Apple's default python (built with Clang) when running the Tkinter GUI, since the Tkinter module in the anaconda intsall make the GUIs look like they do on Linux!\r\n* Multi-threading and queues\r\n * [thread](https://github.com/jamesgowdy/examples/blob/master/thread_example.py): run two+ thrads in unison\r\n * [threading1](https://github.com/jamesgowdy/examples/blob/master/threading_example.py): download files, carry out calculations in background, the Thread class, logging \r\n * [threading2](https://github.com/jamesgowdy/examples/blob/master/threading_example2.py): communicate between slave/main threads with a Queue, and detect KeyboardInterrupt\r\n * [threading3](https://github.com/jamesgowdy/examples/blob/master/threading_example3.py): same as above but dynamically allocate jobs\r\n* Servers and sockets and CGI programming\r\n * [socket1](https://github.com/jamesgowdy/examples/blob/master/socket_example1.py): listens and talks to socket2, try/finally construct usage\r\n * [socket2](https://github.com/jamesgowdy/examples/blob/master/socket_example2.py): talks and listens to socket1\r\n * [cgi1](https://github.com/jamesgowdy/examples/blob/master/cgi-bin/example.py): user input form and reply uses [example.html](https://github.com/jamesgowdy/examples/blob/master/example.html)\r\n * [cgi2](https://github.com/jamesgowdy/examples/blob/master/cgi-bin/cgi.example2.py): more complex user input/reply (HKL2resolution app) uses [example2.html](https://github.com/jamesgowdy/examples/blob/master/example2.html) and [example2.reply.html](https://github.com/jamesgowdy/examples/blob/master/example2.reply.html)\r\n * [HTTPServer](https://github.com/jamesgowdy/examples/blob/master/HTTPServer_example.py): set up HTTPServer on localhost to run CGI scripts from\r\n All cgi scripts should be placed in a cgi-bin directory and made executable. HTTPSever and HTML templates are one directory up from cgi-bin. After running server open the HTML files in firefox at \\<ipaddress\\>:\\<port\\>/example.html \r\n* Regex, string manipulation\r\n * [re](https://github.com/jamesgowdy/examples/blob/master/re_example.py): lots and lots of regular expression examples\r\n * [unicodedata](https://github.com/jamesgowdy/examples/blob/master/unicodedata_example.py): read/print the unicode symbols to the terminal\r\n * [string](https://github.com/jamesgowdy/examples/blob/master/string_example.py): old/new formatting sub-languages, template strings\r\n * [textwrap](https://github.com/jamesgowdy/examples/blob/master/textwrap_example.py): useful only for dedent<br>\r\n* Curses (coloured printing to terminal) and pprint\r\n * [curses1](https://github.com/jamesgowdy/examples/blob/master/curses_example.py): print to terminal in color/bold/underlined/italics\r\n * [curses2](https://github.com/jamesgowdy/examples/blob/master/curses_wrapper_example.py): standard screen (app takes user input to display different colors), hack implemented as a main function wrapper to ensure keyboard responisive, try/finally construct used \r\n * [pprint](https://github.com/jamesgowdy/examples/blob/master/pprint_example.py): pretty object printing\r\n* Readng HTML and downloading etc\r\n * [HTMLParser1](https://github.com/jamesgowdy/examples/blob/master/HTMLParser_example.py): basic use of HTMLParser class to read website data (e.g. download and pull out the IUCR index neatly)\r\n * [HTMLParser2](https://github.com/jamesgowdy/examples/blob/master/HTMLParser2_example.py): more handles, connects to a CGI script on the localhost\r\n * [xml](https://github.com/jamesgowdy/examples/blob/master/xml_example.py): Parses example.xml using SAX or DOM handlers\r\n * [urlib](https://github.com/jamesgowdy/examples/blob/master/urllib_example.py): very basic (download a PDB file) see also Tkinter11 for more complicated use\r\n* Useful functions and classes\r\n * [collections](https://github.com/jamesgowdy/examples/blob/master/collections_example.py): including defaultdict, Counter, namedtuple, OrderedDict (download stock trading info), some custom subclasses\r\n * [itertools1](https://github.com/jamesgowdy/examples/blob/master/itertools_example.py): clever functions such as takewhile, groupby and compress\r\n * [itertools2](https://github.com/jamesgowdy/examples/blob/master/itertools_example2.py): combinations etc.\r\n * [functools1](https://github.com/jamesgowdy/examples/blob/master/partial_example.py): partial functions\r\n * [functools2](https://github.com/jamesgowdy/examples/blob/master/decorator_example.py): decorators\r\n * [functools3](https://github.com/jamesgowdy/examples/blob/master/total_ordering_example.py): total ordering\r\n * [operator](https://github.com/jamesgowdy/examples/blob/master/operator_example.py): maths operators as functions\r\n * [copy](https://github.com/jamesgowdy/examples/blob/master/copy_example.py): including deepcopy for list of lists.\r\n* Data and persistence\r\n * [struct](https://github.com/jamesgowdy/examples/blob/master/struct_example.py): read/write binary (e.g. read DCD file)\r\n * [pickle](https://github.com/jamesgowdy/examples/blob/master/pickle_example.py): use cpickle instead \r\n * [shelve](https://github.com/jamesgowdy/examples/blob/master/shelve_example.py): persistence archive like a dictionary \r\n * [sqlite3](https://github.com/jamesgowdy/examples/blob/master/sqlite3_example.py): connecting to the squlite database\r\n * [csv](https://github.com/jamesgowdy/examples/blob/master/csv_example.py): read/write .csv format files \r\n * [xlrd/xlwt/xlutils](https://github.com/jamesgowdy/examples/blob/master/xlrd_example.py): read and write excel .xml files (3rd party)\r\n* Math/sorting\r\n * [cmath](https://github.com/jamesgowdy/examples/blob/master/cmath_example.py): complex math\r\n * [random](https://github.com/jamesgowdy/examples/blob/master/random_example.py): psudeo-random numbers and distributions\r\n * [fractions](https://github.com/jamesgowdy/examples/blob/master/fractions_example.py): floats as fractions using limit_denominator, GCD calculation\r\n * [decimal](https://github.com/jamesgowdy/examples/blob/master/decimal_example.py): decimal floating point numbers rather than binary floating point\r\n * [set](https://github.com/jamesgowdy/examples/blob/master/set_example.py): built-in set methods\r\n * [bisect](https://github.com/jamesgowdy/examples/blob/master/bisect_example.py): sort algorithm if appending and resorting\r\n * [heapq](https://github.com/jamesgowdy/examples/blob/master/heapq_example.py): sort algorithm\r\n* System and OS tools\r\n * [sys](https://github.com/jamesgowdy/examples/blob/master/sys_example.py): interpretter parameters\r\n * [os1](https://github.com/jamesgowdy/examples/blob/master/os_example.py): environmental variables, functions similar to shutil, nice, change creation time parameters etc.\r\n * [os2](https://github.com/jamesgowdy/examples/blob/master/os_kill_example.py): watch a process (given by process ID) and report on status \r\n * [os3](https://github.com/jamesgowdy/examples/blob/master/os_walk_example.py): walk down a file tree (2 implementations)\r\n * [os4](https://github.com/jamesgowdy/examples/blob/master/os_path_example.py): OS specific path manipultaion, size of file\r\n * [subprocess](https://github.com/jamesgowdy/examples/blob/master/subprocess_example.py): spawn subprocesses from shell capturing stdout and stderr\r\n * [shutil](https://github.com/jamesgowdy/examples/blob/master/shutil_example.py): access functions like mv, rm, cp etc. \r\n * [glob](https://github.com/jamesgowdy/examples/blob/master/glob_example.py): use wildcards when searching file directory (e.g. \\*.py file sizes)\r\n * [psutils](https://github.com/jamesgowdy/examples/blob/master/psutil_example.py): monitor system usage (3rd party)\r\n* CLI mode\r\n * [cmd](https://github.com/jamesgowdy/examples/blob/master/cmd_example.py): run a program interactively via terminal with tab completion, subclass and overwrite Cmd method, and write own 'do' methods<br>\r\n * [argparse](https://github.com/jamesgowdy/examples/blob/master/argparse_example.py): sophistcated argument parsing vs. simple DIY parser\r\n* Coding tools\r\n * [inspect](https://github.com/jamesgowdy/examples/blob/master/inspect_example.py): inspect different levels of the stack (e.g. before functions are called) or inspect object properties (e.g. function arguments) not as elegant as traceback2\r\n * [traceback1](https://github.com/jamesgowdy/examples/blob/master/traceback_example.py): parse a function call without regex, not as elegant as given in traceback2 or inspect \r\n * [traceback2](https://github.com/jamesgowdy/examples/blob/master/traceback_example2.py): parse function call with regex\r\n * [doctest](https://github.com/jamesgowdy/examples/blob/master/doctest_example.py): Test examples (e.g. factorial) in doc strings\r\n * [rlcompleter](https://github.com/jamesgowdy/examples/blob/master/rlcompleter_example.py): use with readline to get IPython like tab completion\r\n * [readline](https://github.com/jamesgowdy/examples/blob/master/readline_example.py): same as above with vim-like raw input\r\n * [imp](https://github.com/jamesgowdy/examples/blob/master/imp_example.py): import modules by filename, warning suppression using with context manager\r\n * [profile](https://github.com/jamesgowdy/examples/blob/master/profile_example.py): time code (bisect vs. built-in sort)\r\n* Logging and warnings\r\n * [logging1](https://github.com/jamesgowdy/examples/blob/master/logging_example.py): different levels of logging (boring), control warning stacklevel\r\n * [logging2](https://github.com/jamesgowdy/examples/blob/master/logging_example2.py): log formatter template\r\n * [warnings](https://github.com/jamesgowdy/examples/blob/master/warnings_example.py): raise warnings rather than errors\r\n* Time and date\r\n * [time](https://github.com/jamesgowdy/examples/blob/master/time_example.py): current epoch time, and custom code timing context manager class\r\n * [datetime](https://github.com/jamesgowdy/examples/blob/master/datetime_example.py): convert times and timedeltas\r\n* Other: run command files, HOWTOs\r\n * [vim commands](https://github.com/jamesgowdy/examples/blob/master/vim_example.md): custom syntax, copy from clipboard, hardcopy printing, etc.\r\n * [bash commands](https://github.com/jamesgowdy/examples/blob/master/bash_example.md): file/os level management in bash \r\n * [.vimrc](https://github.com/jamesgowdy/examples/blob/master/.vimrc): clever indenting, statusbar formatting, printer setup\r\n * [.pythonrc](https://github.com/jamesgowdy/examples/blob/master/.pythonrc): my mac PYTHONSTARTUP file using [colour printing](https://github.com/jamesgowdy/examples/blob/master/pythonrc.png) display hook with rebound REPL\r\n* Sphinx compatible docstrings (external)\r\n * [http://matplotlib.org/sampledoc/cheatsheet.html#making-a-list](http://matplotlib.org/sampledoc/cheatsheet.html#making-a-list)\r\n * [https://pythonhosted.org/an_example_pypi_project/sphinx.html](https://pythonhosted.org/an_example_pypi_project/sphinx.html)\r\n * [http://sphinx-doc.org/](http://sphinx-doc.org/)\r\n * [http://raxcloud.blogspot.co.uk/2013/02/documenting-python-code-using-sphinx.html](http://raxcloud.blogspot.co.uk/2013/02/documenting-python-code-using-sphinx.html)\r\n \r\n### Project Euler Solutions\r\n\r\n1. [Problems_001-005](http://nbviewer.ipython.org/github/jamesgowdy/euler/blob/master/problems_001_005.ipynb)\r\n1. [Problems_006-010](http://nbviewer.ipython.org/github/jamesgowdy/euler/blob/master/problems_006_010.ipynb)","google":"*","note":"Don't delete this file! It's used internally to help with page regeneration."}