Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Introduce PyParameters and PyGcParameters to get rid of the impl_para…
…meters macros
  • Loading branch information
prehner committed Apr 5, 2025
commit 52725dadf136b80a7a7e63d140572c208f115773
1 change: 1 addition & 0 deletions feos-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ typenum = "1.16"
approx = "0.5"
regex = "1.9"
pythonize = "0.23.0"
itertools = "0.14"

[features]
default = []
Expand Down
15 changes: 15 additions & 0 deletions feos-core/src/parameter/identifier.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use serde::{Deserialize, Serialize};
use std::fmt;
use std::hash::{Hash, Hasher};

/// Possible variants to identify a substance.
Expand All @@ -13,6 +14,20 @@ pub enum IdentifierOption {
Formula,
}

impl fmt::Display for IdentifierOption {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let str = match self {
IdentifierOption::Cas => "CAS",
IdentifierOption::Name => "name",
IdentifierOption::IupacName => "IUPAC name",
IdentifierOption::Smiles => "SMILES",
IdentifierOption::Inchi => "InChI",
IdentifierOption::Formula => "formula",
};
write!(f, "{}", str)
}
}

/// A collection of identifiers for a chemical structure or substance.
#[cfg_attr(feature = "python", pyo3::pyclass(get_all, set_all))]
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
Expand Down
23 changes: 0 additions & 23 deletions feos-core/src/python/cubic.rs

This file was deleted.

1 change: 0 additions & 1 deletion feos-core/src/python/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::EosError;
use pyo3::exceptions::PyRuntimeError;
use pyo3::prelude::*;

pub mod cubic;
mod equation_of_state;
pub mod parameter;
mod phase_equilibria;
Expand Down
Loading
Loading