-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulling from pele-python:master on 09/12/14 #109
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xyz file into graph of a molecule. Also created a utilities module for generic useful functions and a wrapper to create a quiet pymol instance.
Understands XYZ and PDB files. Has been tested with it's own unit tester.
as a networkx graph. Understands PDB and XYZ files using the pymol interface, but could easily be modified to add other files that pymol understands. tested and passed its own test class also.
several new classes including parser, analyser, molecularsystem. Incorporated the protein class as a sub class in the molecule file. added a testing system which tests the pymol parser and ensures that the system basically works.
Incorporate Chris's molecule stuff
…'s subclassed properly.
Changes from Oct 7th onwards in pele-python/pele and miscellaneous fixes from PyCharm
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.
Pull changes from Chris F 03/12/14
Pull from main Pele repository 03/12/14
Right align is the default for format, > removed.
Removed redundant > from coords_io.py
khs26
pushed a commit
that referenced
this pull request
Dec 9, 2014
Pulling from pele-python:master on 09/12/14
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.