Merge pull request #1 from khs26/master

Changes from Oct 7th onwards in pele-python/pele and miscellaneous fixes from PyCharm
small tweaks to parser.py.
Merge branch 'master' of https://github.com/cjforman/pele
Molecule.py

Atom and molecule classes now have __eq__ operators.
Atomic equality is defined as having the same symbol.
Molecular equality is defined as isomorphic graphs
whose nodes, in isomorphic positions, have equal atoms.
Thus permutational isomers are considered equal molecules.

During initialisation a hash function is computed for each
molecule which is the absolute value of the product of the non-zero
eigenvalues of the weighted adjacency matrix. The weights
of the adjacency matrix are the square root of of the product of the
mass of the atoms connected by each edge. This is unlikely to give
the same value for two isomorphics molecules that have distinct labels.

Corresponding not equal functions have been defined.

The Protein Class has not been updated.

Parser.py
The definition of the parser has now changed. The parser is a class
for loading files and constructing graphs of each distinct molecule
defined in the file.  A molecule is defined as a graph that has no connections
to any of the other graphs in the system.

Models and frames should be analysed individually and added to the graph
seperately.

The graph is then analysed for distinct graphs and the coords of each atom
are determined.

A list of graphs and corresponding coords arrays can then be extracted using
seperate access functions.

A generic parser has been implemented that returns an empty graph. this should
be considered as a template to be overloaded in a sub class should a new parser
be required.

The pymol parser creates an instance of pymol at initialisation and this is used
to create the distinct graphs. All the functions relating to pymol are contained
in the PymolParser class.

After initialisation
the parser may be invoked us often as necessary using the parse() function. This accepts a filename
which is then loaded and analysed using the form_graph functions.
The parse keeps every molecule it has loaded in the topology graph.
Each time successive files are loaded the topology graph is analysed and broken
down into separate graphs which can be accessed via the get graph_all and get_coords_all functions.

NOTE:  ***
When the graphs are created it is vital to add a node attribute called atom, which is a reference to
to the Atom object that constitutes the node. This is critical for the equality functions to work
properly in the molecule class.

MolecularSystemClass

The molecular systems class maintains a list of molecules and a histrogram of how many of each type
of molecule has been created with type defined by their hash functions.

A new molecule or set of molecules can be loaded using the load_file command which takes the parser type as an input parameter
each time it is invoked. The default is pymol_parser.

A molecule object can be added externally to the system using the add_molecule command. Always use this function,
or the load_file function, and their reverses to add/remove moleculed as these functions maintains the molecule Id counter
and also the molecule type histogram.

The molecule system class has access functions for iterators over the molecules within it and also an __eq__ function
for a comprehensive comparison between two distinct molecular system.

the Protein System Class overloads only the load_file command to use the Protein Class to create the molecules.

molecule_test.py

The molecule_test function now defines a reference molecule system using static data. This is written to file and loaded
as if using it to generate a second test molecule system, which are then compared for equality.

analyser.py
Has barely been touched.
Merge pull request #2 from cjforman/master

Pull changes from Chris F 03/12/14