Skip to main content

EADScalc

Description

EADScalc is a python script that can be used to determine the degree of substitution (DS) of modified cellulose (nanomaterials) using organic elemental analysis results, inlcuding correction for water content of the typically hygroscopic cellulose samples.

Installation

Use a python virtual environment and install via pip install EADScalc

Usage

To get help with the script, run:

EADScalc -h

The minimal amount of information you need to enter to run the calculation is:

EADScalc <carbon_content> <hydrogen_content> <nitrogen_content> --nmod <number_of_modifications> --O1 <number_O_first_mod> --H1 <number_H_first_mod>

However, the water content of the sample (humidity) and likely the sulfur content will be needed in most calculations.

For example (sulfate):

EADScalc 41 6 0 --humidity 5 --sulfur 0.5 --nmod 1 --01 4 --S1 1 --H1 1

When considering the empirical formula of the modification, consider all atoms that REPLACE the hydroxyl group that you are modifying. E.g. if you create cellulose acetate, the modification would be C2H3O2.

Output

Results are output to the terminal and to the file named in the command line as a text file.

Support

If there are issues, report via https://github.com/Sustainable-Materials-Lab/EADScalc/issues

Roadmap

No updates are planned for this project and it is in a dormant state.

Recent Updates

2025: Major code refactoring completed

  • Reduced code duplication by consolidating repetitive patterns into data-driven structures
  • Implemented decorator factories for dynamic Click option generation
  • Replaced 39+ manual option decorators with 2 reusable functions
  • Consolidated 13+ atomic mass variables into a single dictionary
  • Refactored residual calculation from 13 if-blocks to a single loop
  • Improved code maintainability while maintaining full backward compatibility
  • All command-line arguments and outputs remain identical

Contributing

Contributors are welcome.

Authors and acknowledgment

Originally authored by Samuel Eyley.

Code refactored with the help of GitHub Copilot.

License

MIT License

Project status

Dormant - I no longer use this in my day to day work, so I am not actively working on it, however, I am willing to fix problems.

Metadata

Release files for EADScalc 1.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for EADScalc 1.2.7
File Size Uploaded Provenance
eadscalc-1.2.7.tar.gz 10.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for EADScalc 1.2.7
File Interpreter ABI Platform
eadscalc-1.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / eadscalc-1.2.7.tar.gz

Download URL eadscalc-1.2.7.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
88f3628bf91cd2495a56cb7c0b2c34704806680c6667f06266cf14af45b17f39
BLAKE2b-256 checksum
How to use checksums
8ee39b0685c8b68ea8fea95d1d5786cf87291b5d2b52fd100f344c4d6c6bd262
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / eadscalc-1.2.7-py3-none-any.whl

Download URL eadscalc-1.2.7-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f44806db5317c3bc783bd5b37762e21123960bdd3cac6ee85af18c208ab2ae4
BLAKE2b-256 checksum
How to use checksums
e96206619b92287ed7907154c29413b168aa7f73104d155bc88f2a0deabe9e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for EADScalc 1.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for eadscalc-1.2.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page