Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mol2 residue and molecule info for sites. (#671)
* modify mbuild converter to flatten compound hierarchy * Add change method to determine molecule_group * Add new label ("molecule" and "group") to help with the conversion * fix typo and paritally update tests * update from_mbuild tests * Add molecule_number update docs Also start translating residue info * Make site.group optional string * add missing var * WIP: Remodel the labeling system, add parse_label Combine residue name and number to be residue, combine molecule name and number to be molecule. Add parse label for from_mbuild method, but as of right now, has really really bad performance (need to rethink the logic here) * remove the cloning step, improve performance * add unit test * update residue handling in convert parmed * change method to parse label when convert from mbuild * include missing import * modify iter_site_by_residue, add iter_site_by_molecule * update to_mbuild to match with new construct * fix edge case when looking up None molecule and residue * fix mol2 reader for new residue and molecule setup * fix unit tests which used old syntax * fix remaining unit tests * replace __getattribute__ with getatt * Address Cal's comment Adjust docstring for the from_mbuild method. Change docstring for the site.group. Change MoleculeType and ResidueType to be NamedTuple. * add options to infer (or not infer) the hierarchy structure when going from gmso to mbuild * add infer_hierarchy for to_mbuild method * parse group info when converting from mbuild * WIP - removing all subtopology class and its reference * remove remaining subtops from gmso objects and tests * fix various errors/bugs, only 6 fails left * fix parameterization bugs * revert one step * add patch for edge case, where molecule_tag is None * fix case when site has no molecule or site * trim misc codes * make top.connections to be determined on the flight, remove self._connections * Remove unnecessary function, relocate boundary bond assertion * use n_direct_bonds inplace of is_independent when parsing residue * add use_molecule_info option for apply * add isomorphic check * Modify Atomtyping parameterization to use flat molecule IDs for applying forcefields * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * revert some changes * Add match_ff_by, option to match by molecule name or group * fix minor typo * Fix bug, add remove_untyped Fix bugs related to the new ff_match_by options. Add new option to remove untyped connections. * add missing flag * more typos fixes * add more unit tests for new features * fix typo and add a comment * parsing all lj and electrostatics scaling availabel, add unit tests * change the error when molecule_id not in molecule_scaling_factors dict * Add atom.clone and topology.create_subtop * populate group and molecule info for cg atom * fix typo * turn error into warning when dict of ff is given on empty top * remove return statement * fix bug when apply ff with scaling factor of 0 * Mol2 format molecule information from RTI This PR address concerns from @bc118 to automatically grab molecule information from a mol2 file and attach it to the site.molecule for each site in top.sites. This will go hand in hand with a future PR to address the `gmso.formats.convert_mbuild.to_mbuild` utility in GMSO to properly build an mBuild.Compound with the hierarchy that will results in lossless mbuild to GMSO conversions. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix bug * remove unused imports Co-authored-by: Co Quach <daico007@gmail.com> Co-authored-by: Co Quach <43968221+daico007@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information