Skip to main content

UNKNOWN

Project description

##What is Mathgraph?

Mathgraph is an open source Python package for calculating topological indices and energy of graphs.

The source code is avalalble at: https://pypi.python.org/pypi/mathgraph

##Usage

~~~~~~~~~~~~~~~~~~ {.python .numberLines}
python
>>> import mathgraph as mg
>>> G = mg.MathGraph()
>>> G.add_edge(0,1)
>>> G.add_edge(1,2)
>>> G.add_edge(2,0)
>>> G.minimal_covering_energy()

Triangular graph, covering sets/energy for the same is as follows
[set([0, 1]), set([1, 2]), set([0, 2])]
[4.1307682818044205, 4.0, 4.0]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

##Structure

Mathgraph is a container of mathchem and networkx objects.
def NX_graph(self):
""" Return NetworkX graph object """
return self.__NX_graph

def Mol_graph(self):
""" Return Mathchem graph object """
if self.__Mol_graph is None:
nxg = self.NX_graph()
self.__Mol_graph = mc.Mol(nx.generate_graph6(nxg))
return self.__Mol_graph

##Functionality
degree_matrix
complementary_subset
dominating_set
minimal_dominating_set
minimal_dominating_energy
covering_set
minimal_covering_set
minimal_covering_energy
min_laplacian_dominating_energy
atom_bond_connectivity_index2
atom_bond_connectivity_index4
seidel_energy
maximum_degree_energy
common_neighbourhood
atom_bond_connectivity_index5

##Installation

###As Python module
For any UNIX-like system the installation process is trivial:

pip install mathgraph

####Depends on:
numpy mathchem networkx

##About

Mathgraph package written by Sudharsan Vijayaraghavan and Ananda Kumar MR

###TODO:
optimizations of code
double dominating set and so on

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mathgraph-0.0.1.tar.gz (1.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page