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.

Download files

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

Source Distribution

eadscalc-1.2.6.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

eadscalc-1.2.6-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file eadscalc-1.2.6.tar.gz.

File metadata

  • Download URL: eadscalc-1.2.6.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for eadscalc-1.2.6.tar.gz
Algorithm Hash digest
SHA256 b4d416a4b574fa98ee2b283792b8be4c5eb31d7ecbd0cff5406efb2ef77e8a3a
MD5 b2d9026701dc3917dcbee3763076ecf1
BLAKE2b-256 3f6b99a1693a0412a925a27c1d73f153b19f1fbe7494915b8c9b4e4fdf67b2b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for eadscalc-1.2.6.tar.gz:

Publisher: release.yml on Sustainable-Materials-Lab/EADScalc

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

File details

Details for the file eadscalc-1.2.6-py3-none-any.whl.

File metadata

  • Download URL: eadscalc-1.2.6-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for eadscalc-1.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7b5247e216c96f63d641cdb1beb0142b47eab213983b18f11f145a064d60aaff
MD5 8d36ce75702ee93a228311112f21ea42
BLAKE2b-256 9bf0cfa8d23e13154a2ba266c8864eda6946e3d72d3e5e193c4f45c903205825

See more details on using hashes here.

Provenance

The following attestation bundles were made for eadscalc-1.2.6-py3-none-any.whl:

Publisher: release.yml on Sustainable-Materials-Lab/EADScalc

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

Release history Release notifications | RSS feed

This release

1.2.6 This release

2 files

1.2.5

2 files

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