Coder Social home page Coder Social logo

polymerist's Issues

Fileutils extension improvement

Would like to encapsulate and better document file extensions

  • Want dedicated Extension class which implements from_path, dotless, path append (check that this hasn't already been implemented in an existing package!)
  • Provide database of extensions (likely based on mimetypes)
  • Consider moving fileutils outside of gentuils entirely (make parallel submodule)

Expansion of portlib

Several refinements and additions planned for the rdutils.amalgamation.portlib module:

  • Considering making part of rdutils directly
  • Deduplify enumeration of port pairs (preclude need for set operations)
  • Determine proper function for counting number of bonds in the general case (RDAtom.GetDegree(), RDAtom.GetTotalDegree(), len(RDAtom.GetBonds(), or RDAtom.GetExplicitDegree())
  • Deprecate support for flavor-0 ports as being able to bond with anything
  • Add support for using Enum to describe flavors (would still be ints and isotope number under the hood)

Phasing out OpenMM-unit defaults throughout in favor of Pint-style units

Currently, the maths.lattices.bravais.LatticeParameters class, while correctly implemented mathematically and supporting radians or degrees, does not provide support for OpenMM Quanity values for lattice parameters. Additionally, many legacy components of polymerist could be unified by reimplementation via LatticeParameters, rather than bespoke array methods as currently implemented. Namely:

  • LatticeParameters should support length-valued unit vector lengths and angle-valued axial angles. This should be reflected in the "in_degrees" parameter in the angles property
  • lammpstools.lammpseval.get_lammps_unit_cell(): should support return of a LatticeParameters object, rather than just a dict
  • openfftools.boxvectors: similarly, much of the functionality in this module could be supplanted by functionality LatticeParameters already provides

More broadly, the use of OpenMM-style units as defaults throughout this project may in the future be replaced by OpenFF-style units for greater cross-compatibility. This would effect a number of changes including:

  • unitutils.physconsts and unitutils.extraunits : these could be replaced by a Pint-style default setup file for UnitRegistry (see the defaults and constants files in the main Pint repository)
  • mdtools.lammpstools.unitstyles: this would need to be re-implemented with Pint-style units (including many custom CGS/electron-style units not currently supported by OpenFF units)
  • mdtools.openfftools.boxvectors: this would be re-implemented to expect OpenFF units as default, and ideally not even need to breathe a word about OpenMM units (that should be handled by unitutils.interop)

Expansion of port-bonding

Several refinements and additions planned for the rdutils.amalgamation.bonding module:

  • Considering making part of rdutils directly
  • Need to test and verify that saturated structures generate (under normal usage) valid RDKit Mols
  • Add support for labeling newly-created ports (as commented out here by decrease_bond_order uniquely via int_complement
  • Re-implement increase_bond_order to change bond in "one-shot" (rather than by iterating single-order upconversions). This would remove the need to relocate atom IDs by map number after each upconversion and would simplify sanitization
  • Canonicalize alternate implementation of _increase_bond_order backend method
  • Revisit implementations of dissolve_bond and saturate_ports

Stronger typing

Feel the need to strengthen typing and tyehints in a handful of places:

  • gentutils.typetools : Replace custom Numeric type with builtin numbers.Number
  • genutils.typetools.numpytypes : Implement arithmetic operation into array size generics (“N”, “M”, etc.) to allow arithmetic in annotations (e.g. NDArray[Shape[N/2, M**2], int] ). Relevant starting points can be found in PEP 646
  • genutils.decorators.meta : Add detailed type signature transfer to all meta-decorators
  • genutils.decorators.functional : Fix TypeErrors raised by Callables modified with optional_in_place decorator when passing positional-only args as kwargs
  • openfftools.boxvectors: most of the type-checking here could be migrated to genutils.typetools.numpytypes, while the unit checking could be migrated to unitutils

Refinements to polymer_examples-derived code

Certain polymerist modules are essentially clones of scripts found in openff/polymer_examples, written by Connor Davel. These scripts would be greatly improved by being made more consistent with the rest of polymerist, in terms of functionality, consistency, and readability. The most obvoius of such changes are:

  • openfftools.partition : would be desirable to separate single-mol partitioning from whole topology partitioning
  • openfftools.partition : would like to have a separate method to merely check where a partition already exists (rather than just attempting to repartition always)
  • openfftools.partition : would like to migrate graph traversal to other, standardized library (perhaps rdutils.rdgraphs)
  • monomers.conversion : finish absorbing this module into monomers.specification
  • monomers..specification : implement support for SDF, RDKit Mol, and SMILES file I/O. Implement limit on replacements for similar environments (via recursive SMARTS)

Enhancements to reaction templates and assemblers

Numerous feature expansion are planned for rdutils.reactions and the relatedrdutils.bonding, including:

  • reactions.assembly : Implementing JSONification of reaction assemblers. This would involved implementing JOSNSerializers for RDKit Mols to SMILES and SMARTS
  • reactions.assembly : implementing product stereoisomer enumeration and probabilistic reaction pathways. Would require, as a subgoal, detailed option passing for rdChemReactions.ChemicalReaction sanitization flags (which are separate to the default SANITIZE_FLAGS)
  • reactions.fragment : implementing an IntermonomerBondIdentificationStrategy which supports ringed molecule cleavage via search for bridge edges coinciding with newly-formed bonds
  • bonding.permutation : add support for Cycle-based bond remap input (either via dict or directly via maths.cominbatorics.permutations.Cycle/Permutation) to reduce redundancy in current notation
  • bonding.substitution : implement capping such that newly-inserted atoms in cap groups are appended to the list of atom ids, rather than mixed in (i.e. reimplement hydrogenate_mol_ports and saturate_ports to preserve initial atom order via Chem.rdmolops.RenumberAtoms)

Improved checks to sequential parameters in OpenMM simulation schedules

Have documented a handful of issues with loading of serialized States and systems in the sequential openmm simulation runner that need to be resolved:

  • Ensemble-specific system force parameters (namely Barostats) are propogated where they shouldn;t be (e.g. a schedule which specifies NPT -> NVT will actually end up being run as
  • Currently no check for when prior state is empty / invalid upon read
  • No protocol for interruption if a simulation fails along the schedule
  • Integrators are currently not being serialized to XML as part of openmmtools.serialization, nor are they supported by SimulationPaths; plan to incorporate these into the workflow templates

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.