Skip to main content

create fingerprints for polymers

Project description

polymerfingerprint

origin

The Polymerfingerprint is a decoder for SMILES of polymer monomer units specialised for machine learning and the product of a prior scientific study "Fingerprint applicable for machine learning tested on LCST behavior of polymers". Please cite us under https://doi.org/10.1016/j.xcrp.2023.101553 upon using the code or the data generated with it.
A tutorial to redo the study is available as "Protocol for creating representations of molecular structures using a polymer-specific decoder" (https://doi.org/10.1016/j.xpro.2024.103055)

Use cases

  • creating fingerprints of homo-, or random copolymers
    • the polymerfingerprint consists of morgan and atom pair fingerprints by default
    • constituting fingerprints can be added removed or swapped out
  • reducing these sets to gain a concise representation for machine learning
  • reducing a new set of polyfingerprints like a prior one to make them comparable and predictable in models trained solely on the first set
  • checking validity of SMILES and parsing them to a PSMILES format and vice versa

Example for creating a reducing a fingerprint set

import polymerfingerprint as pfp

# the create fingerprint function can take dataframes or lists of molecules. These two serve just as examples
a_polyfingerprint = pfp.create_pfp(end_units={"start": "[C](C)(C)(C#N)", "end": "[S]C(=S)OCC"},
                                   repeating_units={0.53: "[CH2][CH1](OC(=O)C)", 0.47: "[CH2][CH](N1C(=O)CCCCC1)"},
                                   mol_weight=35370,
                                   fp_size=2048)

b_polyfingerprint = pfp.create_pfp(end_units={"start": "[C](C=C)(C)(C#N)", "end": "[S]C(=S)OCCCC"},
                                       repeating_units={0.53: "[CH2][CH1](OC(=O)CC)", 0.47: "[CH2][CH](N1C(=O)CCC1)"},
                                       mol_weight=35370, fp_size=2048)

# create a list of polymerfingerprints
list_of_pfps = [a_polyfingerprint, b_polyfingerprint]

reduced_set = pfp.reduce_fp_set(list_of_pfps)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polymerfingerprint-1.0.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polymerfingerprint-1.0.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file polymerfingerprint-1.0.0.tar.gz.

File metadata

  • Download URL: polymerfingerprint-1.0.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for polymerfingerprint-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3e297daa10a5df40863173af49d7916dd7d94ec84fcd518ee9d075d9c0d7efda
MD5 becdce79e78402e27bc3dad012ccfb1f
BLAKE2b-256 631e0d8dd84a8af2d85239fd9ec74386f47ffc9e7eaa69f39ea1ba695f001f1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for polymerfingerprint-1.0.0.tar.gz:

Publisher: version_publish_main.yml on Bizbalt/polymerfingerprint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file polymerfingerprint-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polymerfingerprint-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 957d1a2761c40660f58ec56238f7eb5e9974d39260defe6461d56971246a06ca
MD5 b8c7740c9b9af67dacaf2ca2cb7f971f
BLAKE2b-256 af19357f3ab28139dcfb8f8b8dda85cf21b9ada24105ebb619497d32cb543685

See more details on using hashes here.

Provenance

The following attestation bundles were made for polymerfingerprint-1.0.0-py3-none-any.whl:

Publisher: version_publish_main.yml on Bizbalt/polymerfingerprint

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page