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

De-jankify implementation of DOP in polymer building #24

Closed
15 tasks done
timbernat opened this issue Oct 18, 2024 · 1 comment
Closed
15 tasks done

De-jankify implementation of DOP in polymer building #24

timbernat opened this issue Oct 18, 2024 · 1 comment
Assignees
Labels
api breaking Will change how codes invoking a part of polymerist will be written enhancement New feature or request

Comments

@timbernat
Copy link
Owner

timbernat commented Oct 18, 2024

The current way DOP (degree of polymerization) is defined in polymers.building.build_linear_polymer() is highly non-intuitive and case-specific to an AB/BA (i.e. diblock) sequenced linear polymer. Planned Improvements to this include:

  • Remove the DOP - 2 hardcode
  • Replace DOP input with num_monomers input (which is much less ambiguous)
    • Correcting internals with explicit calculation based on requested DOP, sequence length, and terminal groups, namely DOP_mbuild = (num_monomers - num_terminal) / len(sequence), with failure when this is not an int (i.e. incompatible sequence)
    • Provide mechanism to count how many term groups are provided in a MonomerGroup
    • Correct logging of target DOP to reflect these changes
    • Provide mechanicm for fractional sequence repeats (i.e. 2.5 * "BACA" -> "BACA|BACA|BA")
  • Improve accuracy of .estimation #atom calculations
    • Don't calculate over all monomers present in a MonomerGroup, only those used for actually building
  • Deprecate "DOP" keyword in favor of more explicit "n_monomers"
    • Generally, tighten up terminology such as "n_monomers", "DOP", "chain length", etc throughout .building and .estimation
  • Clean up behavoir of "term_orient" attribute of MonomerGroup
    • Invert order of fields, such that the keys are from {'head', 'tail'}, and the values are the names of monomers
    • Add property to generate end group RDMols based on the value of term_orient
    • Add auto-listification of single-SMARTS entries to monomers on init to enforce stupid legacy-inherited listification
  • Write units tests for building and estimation
@timbernat timbernat added enhancement New feature or request api breaking Will change how codes invoking a part of polymerist will be written labels Oct 18, 2024
@timbernat timbernat self-assigned this Oct 18, 2024
@timbernat timbernat mentioned this issue Dec 10, 2024
14 tasks
@timbernat
Copy link
Owner Author

Addressed by #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api breaking Will change how codes invoking a part of polymerist will be written enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant