chemprop icon indicating copy to clipboard operation
chemprop copied to clipboard

[FEATURE]: v2 polymer functionality

Open kevingreenman opened this issue 2 years ago • 1 comments

Integrate polymer functionality from Coley group's work

kevingreenman avatar Oct 02 '23 20:10 kevingreenman

some brief notes (excuse the mixing of atom/node and bond/edge):

  • the primary difference of polymeric message passing is the introduction of atom and bond weights into the BatchMolGraph (here)
  • during edge-based message passing, a message is calculated as normal and then multiplied by its weight (w_bonds). That is, message aggregation becomes a fixed, weighted sum over messages (i.e., "static attention")
  • during graph aggregation, two things happen:
    1. a similar concept is applied to each node (w_atoms) in the graph (i.e., a fixed, weighted {sum, mean})
    2. the graph-level representation is multiplied by its "degree_of_polymerization" (degree_of_polym)
  • we obtain these attributes via a new featurization scheme (main code block is here). There's a lot going on here, and I don't really understand it myself.
  • the new featurization scheme also relies on the "polymer rules" (list[str]) information being attached to a given polymer. These rules are parsed to obtain (i) the edge weights between repeating monomer units and (ii) the degree of polymerization

davidegraff avatar Oct 03 '23 21:10 davidegraff