Difference between revisions of "Code"

From Predictive Chemistry
Jump to: navigation, search
m (Python Libraries)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
This page contains a list of codes we've found useful for scientific HPC from a developer's perspective. To use existing codes, check out [[Best Practices]].
  +
  +
== Resources ==
  +
  +
These sites allow you to run code interactively in your web browser. They are useful for trying out new ideas and following along with tutorials.
  +
  +
* [https://repl.it/languages/python3 Repl.it] (this is the only one that currently supports numpy)
  +
* [http://www.tutorialspoint.com/codingground.htm CodingGround]
  +
* [http://codepad.org/ CodePad]
  +
* [http://pythonfiddle.com/ PythonFiddle]
  +
  +
== Tutorials ==
  +
  +
When learning a new language, once you've memorized the words, you need to start conversing. Unfortunately, source code is not spoken. It's a stillborn language. One of the best ways to code well is to study and modify other, good code. For code, this means reading and tweaking tutorials first, then design patterns, then large-scale projects next.
  +
  +
* [http://exercism.io/ Exercism Instructions for New Developers]
  +
* [http://matt.might.net/articles/bash-by-example Bash By Example]
  +
* [http://docs.python.org/3/tutorial/datastructures.html Data Structures in Python]
  +
* [http://www.u.arizona.edu/~erdmann/mse350/topics/basic_linear_algebra.html Linear Algebra in Numpy]
  +
* [[Code:gmxliquid|Liquid Structure With Gromacs]]
  +
  +
Remember that it's not enough to just read them. It's actually a positive waste of time. Rather, you have to do some run-tweak-run-debug development cycles with them.
  +
  +
== Publication-related Code ==
  +
* [[Code:realpole]] Real-space quadrature implementation of multipole electrostatics.
  +
  +
== C Libraries ==
  +
  +
With the exception of the standard libraries and the [http://www.gnu.org/software/gsl/ GNU Scientific Library], there are surprisingly few of these about. Here are some generics that we've implemented and are sharing under the GPL.
  +
  +
Robust map and red/black tree code has recently been published to [https://github.com/frobnitzem?tab=repositories github].
  +
  +
The amazing, smallish, extensible, final-form, lambda interpreter in C [http://predictivestatmech.org/code/lambda_final.c].
  +
 
== Python Libraries ==
 
== Python Libraries ==
  +
  +
* [[Code:libnwchem|libnwchem]] A patch against Nwchem 6.5 to build its functionality as a shared library, along with glue code for access using python ctypes.
  +
* [[Code:networkx|Networkx]] a quick guide.
  +
* [https://www.predictivestatmech.org/code/dcd.py Python DCD Library]
   
 
=== Geometric Algebra ===
 
=== Geometric Algebra ===
   
 
The [http://www.predictivestatmech.org/code/galg.py Multivector] class implements geometric algebra using Python's operator overloading. It works with minimal space for any number of spatial dimensions, since it's not based on the matrix / spinor representation of Clifford algebra. Instead, it takes the basis blade approach recommended by Dorst, Fondijne, and Mann [http://www.geometricalgebra.net]. It's really just as easy as ordering all the basis vectors, and keeping track of the commutator (+/- <math>\hat 1</math>).
 
The [http://www.predictivestatmech.org/code/galg.py Multivector] class implements geometric algebra using Python's operator overloading. It works with minimal space for any number of spatial dimensions, since it's not based on the matrix / spinor representation of Clifford algebra. Instead, it takes the basis blade approach recommended by Dorst, Fondijne, and Mann [http://www.geometricalgebra.net]. It's really just as easy as ordering all the basis vectors, and keeping track of the commutator (+/- <math>\hat 1</math>).
  +
  +
== Templates ==
  +
  +
The real world has forms, computation has templates. Pick one up, fill in the blanks, and send it down the chute.
  +
* [[NWChem|NWChem Jobs]]
  +
* [[Code:SLURM|Slurm (USF Circe)]]
  +
* [[Code:SGE|SGE (USF Circe)]]
  +
* [[Code:text2pdf|Text conversion using text2pdf]]
  +
  +
== Efficiencies ==
  +
  +
To chop a tree quickly, spend twice the time sharpening your axe.
  +
* [[Vimrc|vimrc files]]
   
 
== Code Humor ==
 
== Code Humor ==

Latest revision as of 12:10, 1 February 2017

This page contains a list of codes we've found useful for scientific HPC from a developer's perspective. To use existing codes, check out Best Practices.

Resources

These sites allow you to run code interactively in your web browser. They are useful for trying out new ideas and following along with tutorials.

Tutorials

When learning a new language, once you've memorized the words, you need to start conversing. Unfortunately, source code is not spoken. It's a stillborn language. One of the best ways to code well is to study and modify other, good code. For code, this means reading and tweaking tutorials first, then design patterns, then large-scale projects next.

Remember that it's not enough to just read them. It's actually a positive waste of time. Rather, you have to do some run-tweak-run-debug development cycles with them.

Publication-related Code

  • Code:realpole Real-space quadrature implementation of multipole electrostatics.

C Libraries

With the exception of the standard libraries and the GNU Scientific Library, there are surprisingly few of these about. Here are some generics that we've implemented and are sharing under the GPL.

Robust map and red/black tree code has recently been published to github.

The amazing, smallish, extensible, final-form, lambda interpreter in C [1].

Python Libraries

  • libnwchem A patch against Nwchem 6.5 to build its functionality as a shared library, along with glue code for access using python ctypes.
  • Networkx a quick guide.
  • Python DCD Library

Geometric Algebra

The Multivector class implements geometric algebra using Python's operator overloading. It works with minimal space for any number of spatial dimensions, since it's not based on the matrix / spinor representation of Clifford algebra. Instead, it takes the basis blade approach recommended by Dorst, Fondijne, and Mann [2]. It's really just as easy as ordering all the basis vectors, and keeping track of the commutator (+/- <math>\hat 1</math>).

Templates

The real world has forms, computation has templates. Pick one up, fill in the blanks, and send it down the chute.

Efficiencies

To chop a tree quickly, spend twice the time sharpening your axe.

Code Humor

Put this into your makefile: <source lang=bash> Clint\ Eastwood: myday echo "I feel great!" </source>