Skip to content
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

Polymerist omnibus improvements #37

Merged
merged 204 commits into from
Dec 18, 2024
Merged
Changes from 1 commit
Commits
Show all changes
204 commits
Select commit Hold shift + click to select a range
6eda90d
Merge pull request #16 from timbernat/main
timbernat Jul 17, 2024
cbba4c3
Created new genutils.attrs submodule for inspecting attributes
timbernat Aug 15, 2024
a38b3da
Moved compiled_simple_gettable_attrs() from genutils.importutils to g…
timbernat Aug 15, 2024
83054f6
Added return type annotations to class decorators
timbernat Aug 16, 2024
3fa94c7
Wrote decorator which dynamically registers abstract class attributes
timbernat Aug 16, 2024
357fb91
Fixed bug where class attribute was not actually being set in registe…
timbernat Aug 16, 2024
23c94ef
Created new genutils submodule for generic tree-related functionality
timbernat Aug 16, 2024
30df13a
Added option to filter (via "stop" Callable) in compile_tree()
timbernat Aug 16, 2024
edd5e93
Broke treetools into component submodules
timbernat Aug 16, 2024
7338e7f
Moved filter typehints to their own dedicated module
timbernat Aug 16, 2024
aa30f4e
Added option to filter down node attributes when copying nodes/trees
timbernat Aug 16, 2024
c46bf5c
Renamed compiled_simple_getable_attrs() to compile_argfree_getable_at…
timbernat Aug 16, 2024
d0af3d3
Added option to filter attributes when copying a Node or tree
timbernat Aug 16, 2024
dd03eef
Added explicit "ALWAYS_TRUE" and "ALWAYS_FALSE" filters to cover alte…
timbernat Aug 16, 2024
914f31e
Merge branch 'main' into feature-trees (adds unit test setup)
timbernat Aug 29, 2024
74af987
Merge pull request #22 from timbernat/main
timbernat Sep 10, 2024
cdbe8cf
Merge branch 'main' into feature-trees
timbernat Sep 11, 2024
f011f5b
Merge branch 'main' into feature-trees
timbernat Sep 18, 2024
5473e04
Merge branch 'main' into feature-trees
timbernat Oct 10, 2024
d4a4214
Merge branch 'main' into dev
timbernat Oct 18, 2024
de46645
Created new genutils.attrs submodule for inspecting attributes
timbernat Aug 15, 2024
9ffbbdd
Moved compiled_simple_gettable_attrs() from genutils.importutils to g…
timbernat Aug 15, 2024
b72dfbd
Added return type annotations to class decorators
timbernat Aug 16, 2024
b3ec0e4
Wrote decorator which dynamically registers abstract class attributes
timbernat Aug 16, 2024
0099373
Fixed bug where class attribute was not actually being set in registe…
timbernat Aug 16, 2024
05fd391
Created new genutils submodule for generic tree-related functionality
timbernat Aug 16, 2024
bde603c
Added option to filter (via "stop" Callable) in compile_tree()
timbernat Aug 16, 2024
4311da4
Broke treetools into component submodules
timbernat Aug 16, 2024
c2205ed
Moved filter typehints to their own dedicated module
timbernat Aug 16, 2024
0c32bca
Added option to filter down node attributes when copying nodes/trees
timbernat Aug 16, 2024
976346a
Renamed compiled_simple_getable_attrs() to compile_argfree_getable_at…
timbernat Aug 16, 2024
1049b0a
Added option to filter attributes when copying a Node or tree
timbernat Aug 16, 2024
687b50d
Added explicit "ALWAYS_TRUE" and "ALWAYS_FALSE" filters to cover alte…
timbernat Aug 16, 2024
b2be379
Merge remote-tracking branch 'refs/remotes/origin/feature-trees' into…
timbernat Oct 18, 2024
ca051cf
Removed "Abstract" prefix to make class name "NodeCorrespondence" to …
timbernat Nov 13, 2024
583c5b9
Remaned "getter_str" to "getter_re" to make intent and usage clearer
timbernat Nov 13, 2024
64dd928
Expanded docstring to conform to numpy docstring standard
timbernat Nov 13, 2024
5258458
Wrote unit tests for genutils.attrs
timbernat Nov 13, 2024
92cc73c
Expanded path emptiness checks to explicitly handle both files and dirs
timbernat Nov 13, 2024
f093de8
Renamed to "treebase" and updated module docstring
timbernat Nov 13, 2024
cb26814
Expanded docstrings, added exclude filter mixin and check for Node at…
timbernat Nov 13, 2024
7c411be
Fixed exclude_mixin recursion depth bug
timbernat Nov 13, 2024
4b8b73a
Added treetools submodule for visualizing trees
timbernat Nov 13, 2024
7d012c2
Added registration of common aliases for tree print styles
timbernat Nov 13, 2024
de9b986
Provided Path-specific implementation of trees
timbernat Nov 13, 2024
c9a68f0
Added dummy directory for testing filetree capability
timbernat Nov 13, 2024
fed1b37
Modified pyproject.toml to ship subdirectories within tests.data (not…
timbernat Nov 13, 2024
3b23945
Added unit tests module for filetree
timbernat Nov 13, 2024
5860d77
Deprecated OpenMM dependencies for duration and moved it within genutils
timbernat Nov 14, 2024
6de61bd
Wrote unit tests for genutils.fileutils.filetree
timbernat Nov 14, 2024
25197b2
Grouped all dynamic import-related modules into dedicated genutils su…
timbernat Nov 14, 2024
7308738
Updated docstrings and relative imports
timbernat Nov 14, 2024
4b5061f
Updated pkginspect imports following move into importutils
timbernat Nov 14, 2024
5916a47
Added module name info extraction functions
timbernat Nov 14, 2024
b9b9169
Completely reimplemented module hierarchies in terms of trees
timbernat Nov 14, 2024
7f21c3d
Moved submodule_loggers from importutils into logutils
timbernat Nov 14, 2024
9919490
Registered core functionality at importutils subpackage level
timbernat Nov 14, 2024
355331b
Moved tree testing into tests module proper
timbernat Nov 14, 2024
fa461f8
Separated node attr extraction from copying, enhanced docstrings
timbernat Nov 18, 2024
41d1fea
Added option to omit "name" from get_node_attributes (useful for copy…
timbernat Nov 18, 2024
cffebdb
Added duoplicate-name node to example tree to strengthen robustness o…
timbernat Nov 18, 2024
6481c07
Clarified stop criterion inclusivity in docstring
timbernat Nov 18, 2024
6dc492e
Corrected inclusivity docstring to correctly label algorithm as inclu…
timbernat Nov 18, 2024
1b220e5
Implemented anytree-to-networkx converter
timbernat Nov 18, 2024
b5e93e1
Wrote unit tests for node attribute fetching
timbernat Nov 18, 2024
25a50a9
Renamed "treetools" to just "trees"
timbernat Nov 18, 2024
ccc4cf5
Wrote unit tests for node copying
timbernat Nov 18, 2024
fe817bc
Wrote unit tests for tree copying
timbernat Nov 18, 2024
cc4e41e
Changed networkx mirror of Node name attribute to be called "name", i…
timbernat Nov 19, 2024
aee97bc
Wrote unit test for anytree-to-networkx conversion
timbernat Nov 19, 2024
6b878da
Fixed premature return in submodule_loggers()
timbernat Nov 19, 2024
cb61618
Privatized pkgutils.iter_modules() to avoid confusion with iter_submo…
timbernat Nov 19, 2024
d93465d
Reimplemented extract_imports_from_module() with more robust package …
timbernat Nov 19, 2024
2ba0996
Exposed submodule classes and functions at the subpackage levels
timbernat Nov 19, 2024
a7bc177
Added "dev" branch to auto-test action on coomit + PR
timbernat Nov 19, 2024
6ec9f06
Baked importutils directly into toplevel module
timbernat Nov 19, 2024
8be2c86
Merge pull request #29 from timbernat/feature-trees
timbernat Nov 19, 2024
2220afc
Consolidated functgroups.records with _daylight_scrape
timbernat Nov 19, 2024
0c4c0c3
Inserted missing docstrings
timbernat Nov 19, 2024
eedb22f
Fixed docstring typo
timbernat Nov 19, 2024
1b7ef7d
Updated module-level docstring and author tags
timbernat Nov 19, 2024
f8541eb
Inserted __author__ and __email__ tags throughout all modules
timbernat Nov 19, 2024
a7e34d6
Added sphinx requirement, deprecated chemspipy dependency
timbernat Nov 19, 2024
91669a7
Merge pull request #30 from timbernat/author-tags
timbernat Nov 19, 2024
2a19f18
Added importutils submodule for dynamically checking module dependencies
timbernat Nov 20, 2024
129a7b1
Moved importutils tests into dedicated tests.gentutils.importutils su…
timbernat Nov 21, 2024
d077bd4
Reimplemented find_module() with importlib.util.find_spec() to avoid …
timbernat Nov 21, 2024
ff82901
Wrte unit tests for importutils.dependencies
timbernat Nov 21, 2024
c7ac3f7
Standardized docstrings
timbernat Nov 21, 2024
e14afd7
Added unit tests module for mdutils.openfftools.partialcharge.molchar…
timbernat Nov 21, 2024
1a1b702
Filled out unit tests for molchargers
timbernat Nov 21, 2024
84964f1
Ignored GNN charge model ".model.pt" junk files
timbernat Nov 21, 2024
121e61c
Added extra arg to specify custom Exception type raised for missing d…
timbernat Nov 21, 2024
e13ffe2
Updated MolCharger "CHARGING_METHOD" class attribute to be handled b…
timbernat Nov 21, 2024
eba751b
Made MolCharger subclasses aware of package dependences, directly mak…
timbernat Nov 21, 2024
1cc2743
Updated and pinned NAGL tooling and model versions in env
timbernat Nov 21, 2024
b27c4ab
Strengthened openff.nagl package dependencies
timbernat Nov 21, 2024
458a841
Mae unit tests aware of installed packages (avoid erroneous errors ca…
timbernat Nov 21, 2024
e102159
Added OpenFF Toolkit-specific exceptions to package requirement decor…
timbernat Nov 21, 2024
e51f1d3
Re-added OpenFF Toolkit-specific exceptions to package requirement de…
timbernat Nov 21, 2024
0ec3e00
Added provisional module for smart OpenFF ToolkitWrapper registration
timbernat Nov 21, 2024
844fa03
Reworked type hints to deprecate external dependency on typetools
timbernat Nov 22, 2024
9dda6bf
Removed dependency on typetools
timbernat Nov 22, 2024
4943e10
Fixed ambertools package check, TOOLKITS_BY_CHARGE_METHOD population …
timbernat Dec 2, 2024
4062ab4
Added dynamic ToolkitRegistry and name-based toolkit wrapper registra…
timbernat Dec 2, 2024
589c495
Added submodule for SMIRNOFF force field registrations
timbernat Dec 2, 2024
fbd98c1
Relativized imports, broke up logic blocks among respective OpenFf de…
timbernat Dec 2, 2024
aa2cd54
Inserted author and email tags
timbernat Dec 2, 2024
c1393ac
Deprecated chargemethods submodule in favor of direct registry import…
timbernat Dec 2, 2024
61e3980
Cleaned up openfftools subpackage-level __init__ with openff dependen…
timbernat Dec 2, 2024
b4afb52
Fixed back-to-front imports for offxml getter functions
timbernat Dec 2, 2024
a2d3881
Shunted openff.units dependency into mdtools.openfftools subpackage
timbernat Dec 3, 2024
8bc7326
Created openfftools subpackage for OpenMM interoperability, absorbed …
timbernat Dec 3, 2024
43836a3
Added unit test placeholder for omminter
timbernat Dec 3, 2024
1f8fb8d
Simplified and clarified typehints
timbernat Dec 3, 2024
c06c384
Extended is_volume() to support Pint-style objects, clarified unit-li…
timbernat Dec 3, 2024
8f0fbde
Wrote unit tests for unitutils.dimensions
timbernat Dec 3, 2024
ae9e8b4
Added requirement for "pint" (the units package)
timbernat Dec 3, 2024
9f4b82c
Fixed indents on YAML header comments
timbernat Dec 3, 2024
00f5f97
Inverted import order to cause OpenFF installation error to raise pri…
timbernat Dec 3, 2024
2a979ed
Merge pull request #32 from timbernat/openff-cleanup
timbernat Dec 3, 2024
31f79e3
Updated TypeSerializer and derived classes to use register_abstract_c…
timbernat Dec 4, 2024
6ecbf9a
Reimplemented RDConverter tagging with register_abstract_class_attr()
timbernat Dec 4, 2024
b17f0d3
Registered "ensemble" and "ensemble_name" class attrs with decorator,…
timbernat Dec 4, 2024
2b160ee
Merge pull request #33 from timbernat/decorator-cleanup
timbernat Dec 4, 2024
1adc0b4
Added typehints for SMILES and SMARTS strings
timbernat Dec 4, 2024
5919913
Exposed Smiles and Smarts typehints at subpackage level
timbernat Dec 4, 2024
d5cd8fc
Added function for uniquifying strings (which can preserve character …
timbernat Dec 4, 2024
9a6278e
Updated DOP calculation to check for and yield correct number of mono…
timbernat Dec 4, 2024
c18d394
Established placeholder file + sample fragments for polymer building …
timbernat Dec 4, 2024
4cc360d
Added internal used-monomer-only MonomerGroup which improves accuracy…
timbernat Dec 4, 2024
173990c
Deprecated DOP alias for n_monomers property
timbernat Dec 4, 2024
8eb7267
Expunged all references to "DOP" in favor of clearer terminology
timbernat Dec 4, 2024
88f8b6b
Deprecated filter_text_by_condition()
timbernat Dec 4, 2024
98cec89
Renamed textual.strsearch to textual.substrings, updated docstring
timbernat Dec 4, 2024
de314e7
Implemented function for repeating a string a (possibly fractional) n…
timbernat Dec 4, 2024
3685b39
Added argument for indicating separator between string repeats
timbernat Dec 4, 2024
497791e
Renamed uniquify_str() to unique_string()
timbernat Dec 4, 2024
3c7448e
Renamed "join_indicator" to "joiner" for brevity
timbernat Dec 4, 2024
13c9db7
Fixed bug with parenthesization vs tuplification
timbernat Dec 4, 2024
d3c8be7
Wrote unit tests for textual.substrings
timbernat Dec 4, 2024
487ae6a
Delayed monomer linearity check to only be on the monomer fragments s…
timbernat Dec 4, 2024
ddc20bc
Added range and int typing checks to target_length
timbernat Dec 5, 2024
8714eb8
Added option to register residue names when converting a spec SMARTS …
timbernat Dec 5, 2024
0fe10e9
Renamed "resname_repl" to "resname_map" throughout
timbernat Dec 5, 2024
0bd4355
Implemented mBuild Compound to RDKit converter which preserves confor…
timbernat Dec 5, 2024
d947336
Deprecated irrelevant custom Exceptions, pared down use of "Error" su…
timbernat Dec 5, 2024
7d4b5a1
Implemented support for fractional sequence repeats, with informative…
timbernat Dec 5, 2024
3797c64
Added new custom Exception for end-group dominated chains
timbernat Dec 5, 2024
8c96e48
Separated procrustean sequence determination into dedicated helper fu…
timbernat Dec 5, 2024
f7422bb
Switched order of residue name and head/tail identifier in MonomerGro…
timbernat Dec 5, 2024
e2be34d
Added __post_init__ check for listification of bare SMARTS and for SM…
timbernat Dec 5, 2024
56b4144
Added module-level logger
timbernat Dec 5, 2024
d852ed3
Added internal method for producing end groups for linear polymer bui…
timbernat Dec 5, 2024
9903dd1
Changed MonomerGroup.linear_end_groups from property to vanilla metho…
timbernat Dec 5, 2024
70ee787
Deprecated _has_valid_linear_term_orient, included residue name in li…
timbernat Dec 6, 2024
df12d48
Deferred end group determination to internal implemenation in Monomer…
timbernat Dec 6, 2024
f1e6925
Enhanced logging of sequence breakdown, unified logging between whole…
timbernat Dec 6, 2024
dc053af
Added custom Exception for missing package dependency which reduces e…
timbernat Dec 6, 2024
d4f6361
Deleted superfluous imports
timbernat Dec 6, 2024
88182e7
Converted polymers.building into a package, split up functionality am…
timbernat Dec 6, 2024
c66a3f2
Fixed missing "raise" keywords and incorrect package checks
timbernat Dec 6, 2024
e696828
Fiddled with MissingPrerequisitePackage error message format
timbernat Dec 6, 2024
31f0675
Added Exception for unexpectedly-empty copolymer sequences
timbernat Dec 6, 2024
79296ae
Added precheck for empty sequence kernel
timbernat Dec 9, 2024
cb2587a
Expanded PROCRUSTEAN sequencing algorithm into dedicated dataclass
timbernat Dec 9, 2024
742522e
Made LinearCopolymerSequencer serializable to/from JSON
timbernat Dec 9, 2024
013e09b
Added RDKit-driven PDB writer for mbuild Compounds
timbernat Dec 9, 2024
fb3d898
Expanded out unit test modules for .polymers.building
timbernat Dec 9, 2024
677fede
Updated description of the "PROCRUSTEAN" acronym
timbernat Dec 9, 2024
870a1eb
Wrote unit tests fo copolymer sequencing
timbernat Dec 9, 2024
ce9c55c
Updates SMILES/SMARTS-related type annotations on validation functions
timbernat Dec 9, 2024
75fccee
Moved fragment data directly into code, as opposed to maintaining sep…
timbernat Dec 9, 2024
59f988a
Removed superfluous mBuild imports
timbernat Dec 9, 2024
29d3198
Added devnote to revisit SMARTS-specification auto-cleaning
timbernat Dec 9, 2024
7afceed
Added devnote for spec compliance checker
timbernat Dec 9, 2024
d6d5880
Added MPD-TMC polyamide fragments for examples
timbernat Dec 9, 2024
0e7749f
Added unit tests for MonomerGroup initialization and core properties
timbernat Dec 10, 2024
e33ca3d
Added polyethylene example to test when fewer than the max 2 end grou…
timbernat Dec 10, 2024
0074e4a
Wrote unit test for end group identification
timbernat Dec 10, 2024
f27263f
Expanded syntax and support for addition/validation of new monomer SM…
timbernat Dec 10, 2024
10b8b8c
Added bug note for validation skipping when accessing monomer attribu…
timbernat Dec 10, 2024
30642dc
Added test for degenerate eng group autoassignment (i.e. when NO term…
timbernat Dec 10, 2024
bda08d8
Attempted (unsuccessfully) to get __hash__ working for MonomerGroup
timbernat Dec 10, 2024
32f8d53
Wrote unit tests for linear polymer builder
timbernat Dec 10, 2024
4e31488
Fixed indent on openff_topology_to_openmm() arguments
timbernat Dec 10, 2024
051d128
Removed deprecated local TKREGS import
timbernat Dec 10, 2024
e0cdfc5
Moved unitsys outside of omminter to resolve circular import
timbernat Dec 10, 2024
f416a32
Moved sample monomer fragment sets from unit tests to polymerist proper
timbernat Dec 11, 2024
a770906
Corrected typo in end group autogen warning
timbernat Dec 11, 2024
c991c17
Fixed indent on serialize_openmm_pdb() arguments
timbernat Dec 11, 2024
040a718
Fixed accidental duplication of 3-functional TMC monomer fragment
timbernat Dec 11, 2024
bbd1b85
Added new subpackage for molecule file I/O
timbernat Dec 11, 2024
34d1a7b
Froze SerialAtomLabeller dataclass to avoid unintentional label forma…
timbernat Dec 11, 2024
d9afdc4
Switched PDB atom labelled to dependency-injection based model
timbernat Dec 11, 2024
668c3f9
Renamed "chain" to "polymer" where it occurs to avoid confusion with …
timbernat Dec 11, 2024
a5cc442
Added placeholder unit tests for newly-created `molfiles` subpackage
timbernat Dec 11, 2024
4d128e3
Added residue info injection into mbmol_to_openmm_pdb (PDB outputs ar…
timbernat Dec 11, 2024
f1f8039
Renamed "atom_label_size" to "atom_label_length" for clarity
timbernat Dec 12, 2024
370dc3a
Renamed once more to atom_label_width
timbernat Dec 12, 2024
c61f16a
Fixed non-attribute value in atom_label_width Exception message
timbernat Dec 12, 2024
e40600e
Added string type check for atom element symbols
timbernat Dec 12, 2024
5c282d7
Wrote unit tests for molfiles.pdb.SerialAtomLabeller
timbernat Dec 12, 2024
ce9e052
Merge pull request #34 from timbernat/DOP-hotfix
timbernat Dec 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added bug note for validation skipping when accessing monomer attribu…
…tes directly
  • Loading branch information
timbernat committed Dec 10, 2024
commit 10b8b8c3da65a73e61be919be7279218cb66d8bf
2 changes: 2 additions & 0 deletions polymerist/polymers/monomers/repr.py
Original file line number Diff line number Diff line change
@@ -76,6 +76,8 @@ def add_monomer(self, resname : str, smarts : Union[Smarts, Iterable[Smarts]]) -
def __getitem__(self, resname : str) -> str:
'''Convenience method to access .monomers directly from instance'''
return self.monomers[resname] # NOTE: deliberately avoid "get()" here to propagate KeyError
# BUG: user can directly append to the returned value to forgo monomer validation checks;
# this is not unit to __getitem__ but rather a consequence of thinly-wrapping builtin types

def __setitem__(self, resname : str, smarts : Smarts) -> str:
'''Convenience method to access .monomers directly from instance'''