diff --git a/feos/__init__.py b/feos/__init__.py new file mode 100644 index 000000000..6915bcb21 --- /dev/null +++ b/feos/__init__.py @@ -0,0 +1,16 @@ +from . import feos + +__version__ = feos.__version__ + +__all__ = [ + 'cubic', + 'dft', + 'eos', + 'gc_pcsaft', + 'ideal_gas', + 'pcsaft', + 'pets', + 'saftvrqmie', + 'si', + 'uvtheory' +] diff --git a/feos/cubic.py b/feos/cubic.py new file mode 100644 index 000000000..72ff97be4 --- /dev/null +++ b/feos/cubic.py @@ -0,0 +1,17 @@ +from .feos import cubic + +BinaryRecord = cubic.BinaryRecord +ChemicalRecord = cubic.ChemicalRecord +Identifier = cubic.Identifier +PengRobinsonParameters = cubic.PengRobinsonParameters +PengRobinsonRecord = cubic.PengRobinsonRecord +PureRecord = cubic.PureRecord + +__all__ = [ + 'BinaryRecord', + 'ChemicalRecord', + 'Identifier', + 'PengRobinsonParameters', + 'PengRobinsonRecord', + 'PureRecord', +] diff --git a/feos/dft/__init__.py b/feos/dft/__init__.py new file mode 100644 index 000000000..cb4d59ac9 --- /dev/null +++ b/feos/dft/__init__.py @@ -0,0 +1,44 @@ +from .. import feos + +Adsorption1D = feos.dft.Adsorption1D +Adsorption3D = feos.dft.Adsorption3D +Contributions = feos.dft.Contributions +DFTSolver = feos.dft.DFTSolver +ExternalPotential = feos.dft.ExternalPotential +FMTVersion = feos.dft.FMTVersion +Geometry = feos.dft.Geometry +HelmholtzEnergyFunctional = feos.dft.HelmholtzEnergyFunctional +PairCorrelation = feos.dft.PairCorrelation +PhaseDiagram = feos.dft.PhaseDiagram +PhaseEquilibrium = feos.dft.PhaseEquilibrium +PlanarInterface = feos.dft.PlanarInterface +Pore1D = feos.dft.Pore1D +Pore3D = feos.dft.Pore3D +SolvationProfile = feos.dft.SolvationProfile +State = feos.dft.State +StateVec = feos.dft.StateVec +SurfaceTensionDiagram = feos.dft.SurfaceTensionDiagram +Verbosity = feos.dft.Verbosity + +__all__ = [ + 'Adsorption1D', + 'Adsorption3D', + 'Contributions', + 'DFTSolver', + 'ExternalPotential', + 'FMTVersion', + 'Geometry', + 'HelmholtzEnergyFunctional', + 'PairCorrelation', + 'PhaseDiagram', + 'PhaseEquilibrium', + 'PlanarInterface', + 'Pore1D', + 'Pore3D', + 'SolvationProfile', + 'State', + 'StateVec', + 'SurfaceTensionDiagram', + 'Verbosity', + 'estimator' +] diff --git a/feos/dft/estimator.py b/feos/dft/estimator.py new file mode 100644 index 000000000..6b713b42f --- /dev/null +++ b/feos/dft/estimator.py @@ -0,0 +1,13 @@ +from .. import feos + +DataSet = feos.dft.estimator_dft.DataSet +Estimator = feos.dft.estimator_dft.Estimator +Loss = feos.dft.estimator_dft.Loss +Phase = feos.dft.estimator_dft.Phase + +__all__ = [ + 'DataSet', + 'Estimator', + 'Loss', + 'Phase', +] diff --git a/feos/eos/__init__.py b/feos/eos/__init__.py new file mode 100644 index 000000000..0a75a8d4f --- /dev/null +++ b/feos/eos/__init__.py @@ -0,0 +1,18 @@ +from ..feos import eos + +EquationOfState = eos.EquationOfState +Contributions = eos.Contributions +Verbosity = eos.Verbosity +State = eos.State +PhaseEquilibrium = eos.PhaseEquilibrium +PhaseDiagram = eos.PhaseDiagram + +__all__ = [ + 'EquationOfState', + 'Contributions', + 'Verbosity', + 'State', + 'PhaseEquilibrium', + 'PhaseDiagram', + 'estimator' +] diff --git a/feos/eos/estimator.py b/feos/eos/estimator.py new file mode 100644 index 000000000..030fd8db6 --- /dev/null +++ b/feos/eos/estimator.py @@ -0,0 +1,13 @@ +from ..feos import eos + +DataSet = eos.estimator_eos.DataSet +Estimator = eos.estimator_eos.Estimator +Loss = eos.estimator_eos.Loss +Phase = eos.estimator_eos.Phase + +__all__ = [ + 'DataSet', + 'Estimator', + 'Loss', + 'Phase', +] diff --git a/feos/gc_pcsaft.py b/feos/gc_pcsaft.py new file mode 100644 index 000000000..82d41f8d7 --- /dev/null +++ b/feos/gc_pcsaft.py @@ -0,0 +1,23 @@ +from .feos import gc_pcsaft + +AssociationRecord = gc_pcsaft.AssociationRecord +BinarySegmentRecord = gc_pcsaft.BinarySegmentRecord +ChemicalRecord = gc_pcsaft.ChemicalRecord +GcPcSaftEosParameters = gc_pcsaft.GcPcSaftEosParameters +GcPcSaftFunctionalParameters = gc_pcsaft.GcPcSaftFunctionalParameters +GcPcSaftRecord = gc_pcsaft.GcPcSaftRecord +Identifier = gc_pcsaft.Identifier +IdentifierOption = gc_pcsaft.IdentifierOption +SegmentRecord = gc_pcsaft.SegmentRecord + +__all__ = [ + 'AssociationRecord', + 'BinarySegmentRecord', + 'ChemicalRecord', + 'GcPcSaftEosParameters', + 'GcPcSaftFunctionalParameters', + 'GcPcSaftRecord', + 'Identifier', + 'IdentifierOption', + 'SegmentRecord', +] diff --git a/feos/ideal_gas.py b/feos/ideal_gas.py new file mode 100644 index 000000000..66498a3fa --- /dev/null +++ b/feos/ideal_gas.py @@ -0,0 +1,9 @@ +from .feos import ideal_Gas + +JobackParameters = ideal_gas.JobackParameters +JobackRecord = ideal_gas.JobackRecord + +__all__ = [ + 'JobackParameters', + 'JobackRecord' +] diff --git a/feos/pcsaft.py b/feos/pcsaft.py new file mode 100644 index 000000000..47eacafa0 --- /dev/null +++ b/feos/pcsaft.py @@ -0,0 +1,27 @@ +from .feos import pcsaft + +BinaryRecord = pcsaft.BinaryRecord +BinarySegmentRecord = pcsaft.BinarySegmentRecord +ChemicalRecord = pcsaft.ChemicalRecord +DQVariants = pcsaft.DQVariants +Identifier = pcsaft.Identifier +IdentifierOption = pcsaft.IdentifierOption +PcSaftBinaryRecord = pcsaft.PcSaftBinaryRecord +PcSaftParameters = pcsaft.PcSaftParameters +PcSaftRecord = pcsaft.PcSaftRecord +PureRecord = pcsaft.PureRecord +SegmentRecor = pcsaft.SegmentRecord + +__all__ = [ + 'BinaryRecord', + 'BinarySegmentRecord', + 'ChemicalRecord', + 'DQVariants', + 'Identifier', + 'IdentifierOption', + 'PcSaftBinaryRecord', + 'PcSaftParameters', + 'PcSaftRecord', + 'PureRecord', + 'SegmentRecord', +] diff --git a/feos/pets.py b/feos/pets.py new file mode 100644 index 000000000..1c55e707b --- /dev/null +++ b/feos/pets.py @@ -0,0 +1,19 @@ +from .feos import pets + +BinaryRecord = pets.BinaryRecord +ChemicalRecord = pets.ChemicalRecord +Identifier = pets.Identifier +IdentifierOption = pets.IdentifierOption +PetsParameters = pets.PetsParameters +PetsRecord = pets.PetsRecord +PureRecord = pets.PureRecord + +__all__ = [ + 'BinaryRecord', + 'ChemicalRecord', + 'Identifier', + 'IdentifierOption', + 'PetsParameters', + 'PetsRecord', + 'PureRecord', +] diff --git a/feos/saftvrqmie.py b/feos/saftvrqmie.py new file mode 100644 index 000000000..2c92b59e2 --- /dev/null +++ b/feos/saftvrqmie.py @@ -0,0 +1,19 @@ +from .feos import saftvrqmie + +BinaryRecord = saftvrqmie.BinaryRecord +FeynmanHibbsOrder = saftvrqmie.FeynmanHibbsOrder +Identifier = saftvrqmie.Identifier +IdentifierOption = saftvrqmie.IdentifierOption +PureRecord = saftvrqmie.PureRecord +SaftVRQMieParameters = saftvrqmie.SaftVRQMieParameters +SaftVRQMieRecord = saftvrqmie.SaftVRQMieRecord + +__all__ = [ + 'BinaryRecord', + 'FeynmanHibbsOrder', + 'Identifier', + 'IdentifierOption', + 'PureRecord', + 'SaftVRQMieParameters', + 'SaftVRQMieRecord', +] diff --git a/feos/si.py b/feos/si.py new file mode 100644 index 000000000..2c381a3f0 --- /dev/null +++ b/feos/si.py @@ -0,0 +1,149 @@ +from .feos import quantity + +AMPERE = quantity.AMPERE +AMU = quantity.AMU +ANGSTROM = quantity.ANGSTROM +ATTO = quantity.ATTO +AU = quantity.AU +BAR = quantity.BAR +CALORIE = quantity.CALORIE +CANDELA = quantity.CANDELA +CELSIUS = quantity.CELSIUS +CENTI = quantity.CENTI +CLIGHT = quantity.CLIGHT +COULOMB = quantity.COULOMB +DAY = quantity.DAY +DEBYE = quantity.DEBYE +DECA = quantity.DECA +DECI = quantity.DECI +DEGREES = quantity.DEGREES +DVCS = quantity.DVCS +EXA = quantity.EXA +FARAD = quantity.FARAD +FEMTO = quantity.FEMTO +G = quantity.G +GIGA = quantity.GIGA +GRAM = quantity.GRAM +HECTO = quantity.HECTO +HENRY = quantity.HENRY +HERTZ = quantity.HERTZ +HOUR = quantity.HOUR +JOULE = quantity.JOULE +KB = quantity.KB +KCD = quantity.KCD +KELVIN = quantity.KELVIN +KILO = quantity.KILO +KILOGRAM = quantity.KILOGRAM +LITER = quantity.LITER +MEGA = quantity.MEGA +METER = quantity.METER +MICRO = quantity.MICRO +MILLI = quantity.MILLI +MINUTE = quantity.MINUTE +MOL = quantity.MOL +NANO = quantity.NANO +NAV = quantity.NAV +NEWTON = quantity.NEWTON +OHM = quantity.OHM +PASCAL = quantity.PASCAL +PETA = quantity.PETA +PICO = quantity.PICO +PLANCK = quantity.PLANCK +QE = quantity.QE +QUECTO = quantity.QUECTO +QUETTA = quantity.QUETTA +RADIANS = quantity.RADIANS +RGAS = quantity.RGAS +RONNA = quantity.RONNA +RONTO = quantity.RONTO +SECOND = quantity.SECOND +SIArray1 = quantity.SIArray1 +SIArray2 = quantity.SIArray2 +SIArray3 = quantity.SIArray3 +SIArray4 = quantity.SIArray4 +SIEMENS = quantity.SIEMENS +SINumber = quantity.SINumber +TERA = quantity.TERA +TESLA = quantity.TESLA +VOLT = quantity.VOLT +WATT = quantity.WATT +WEBER = quantity.WEBER +YOCTO = quantity.YOCTO +YOTTA = quantity.YOTTA +ZEPTO = quantity.ZEPTO +ZETTA = quantity.ZETTA + +__all__ = [ + 'AMPERE', + 'AMU', + 'ANGSTROM', + 'ATTO', + 'AU', + 'BAR', + 'CALORIE', + 'CANDELA', + 'CELSIUS', + 'CENTI', + 'CLIGHT', + 'COULOMB', + 'DAY', + 'DEBYE', + 'DECA', + 'DECI', + 'DEGREES', + 'DVCS', + 'EXA', + 'FARAD', + 'FEMTO', + 'G', + 'GIGA', + 'GRAM', + 'HECTO', + 'HENRY', + 'HERTZ', + 'HOUR', + 'JOULE', + 'KB', + 'KCD', + 'KELVIN', + 'KILO', + 'KILOGRAM', + 'LITER', + 'MEGA', + 'METER', + 'MICRO', + 'MILLI', + 'MINUTE', + 'MOL', + 'NANO', + 'NAV', + 'NEWTON', + 'OHM', + 'PASCAL', + 'PETA', + 'PICO', + 'PLANCK', + 'QE', + 'QUECTO', + 'QUETTA', + 'RADIANS', + 'RGAS', + 'RONNA', + 'RONTO', + 'SECOND', + 'SIArray1', + 'SIArray2', + 'SIArray3', + 'SIArray4', + 'SIEMENS', + 'SINumber', + 'TERA', + 'TESLA', + 'VOLT', + 'WATT', + 'WEBER', + 'YOCTO', + 'YOTTA', + 'ZEPTO', + 'ZETTA', +] \ No newline at end of file diff --git a/feos/uvtheory.py b/feos/uvtheory.py new file mode 100644 index 000000000..c8591f54c --- /dev/null +++ b/feos/uvtheory.py @@ -0,0 +1,23 @@ +from .feos import uvtheory + +BinaryRecord = uvtheory.BinaryRecord +ChemicalRecord = uvtheory.ChemicalRecord +Identifier = uvtheory.Identifier +IdentifierOption = uvtheory.IdentifierOption +Perturbation = uvtheory.Perturbation +PureRecord = uvtheory.PureRecord +UVParameters = uvtheory.UVParameters +UVRecord = uvtheory.UVRecord +VirialOrder = uvtheory.VirialOrder + +__all__ = [ + 'BinaryRecord', + 'ChemicalRecord', + 'Identifier', + 'IdentifierOption', + 'Perturbation', + 'PureRecord', + 'UVParameters', + 'UVRecord', + 'VirialOrder', +] diff --git a/src/python/dft.rs b/src/python/dft.rs index 9a3bed231..94e25bddb 100644 --- a/src/python/dft.rs +++ b/src/python/dft.rs @@ -278,5 +278,6 @@ pub fn dft(_py: Python<'_>, m: &PyModule) -> PyResult<()> { pub fn estimator_dft(_py: Python<'_>, m: &PyModule) -> PyResult<()> { m.add_class::()?; m.add_class::()?; - m.add_class::() + m.add_class::()?; + m.add_class::() } diff --git a/src/python/mod.rs b/src/python/mod.rs index e4a3e4f8a..f568fd8c1 100644 --- a/src/python/mod.rs +++ b/src/python/mod.rs @@ -46,39 +46,39 @@ pub fn feos(py: Python<'_>, m: &PyModule) -> PyResult<()> { #[cfg(feature = "saftvrqmie")] m.add_wrapped(wrap_pymodule!(saftvrqmie_module))?; - set_path(py, m, "feos.si", "quantity")?; - set_path(py, m, "feos.eos", "eos")?; - #[cfg(feature = "estimator")] - set_path(py, m, "feos.eos.estimator", "eos.estimator_eos")?; - #[cfg(feature = "dft")] - set_path(py, m, "feos.dft", "dft")?; - #[cfg(all(feature = "dft", feature = "estimator"))] - set_path(py, m, "feos.dft.estimator", "dft.estimator_dft")?; - set_path(py, m, "feos.ideal_gas", "ideal_gas")?; - set_path(py, m, "feos.cubic", "cubic")?; - #[cfg(feature = "pcsaft")] - set_path(py, m, "feos.pcsaft", "pcsaft")?; - #[cfg(feature = "gc_pcsaft")] - set_path(py, m, "feos.gc_pcsaft", "gc_pcsaft")?; - #[cfg(feature = "pets")] - set_path(py, m, "feos.pets", "pets")?; - #[cfg(feature = "uvtheory")] - set_path(py, m, "feos.uvtheory", "uvtheory")?; - #[cfg(feature = "saftvrqmie")] - set_path(py, m, "feos.saftvrqmie", "saftvrqmie")?; +// set_path(py, m, "feos.si", "quantity")?; +// set_path(py, m, "feos.eos", "eos")?; +// #[cfg(feature = "estimator")] +// set_path(py, m, "feos.eos.estimator", "eos.estimator_eos")?; +// #[cfg(feature = "dft")] +// set_path(py, m, "feos.dft", "dft")?; +// #[cfg(all(feature = "dft", feature = "estimator"))] +// set_path(py, m, "feos.dft.estimator", "dft.estimator_dft")?; +// set_path(py, m, "feos.ideal_gas", "ideal_gas")?; +// set_path(py, m, "feos.cubic", "cubic")?; +// #[cfg(feature = "pcsaft")] +// set_path(py, m, "feos.pcsaft", "pcsaft")?; +// #[cfg(feature = "gc_pcsaft")] +// set_path(py, m, "feos.gc_pcsaft", "gc_pcsaft")?; +// #[cfg(feature = "pets")] +// set_path(py, m, "feos.pets", "pets")?; +// #[cfg(feature = "uvtheory")] +// set_path(py, m, "feos.uvtheory", "uvtheory")?; +// #[cfg(feature = "saftvrqmie")] +// set_path(py, m, "feos.saftvrqmie", "saftvrqmie")?; - py.run( - "\ -import sys -quantity.SINumber.__module__ = 'feos.si' -quantity.SIArray1.__module__ = 'feos.si' -quantity.SIArray2.__module__ = 'feos.si' -quantity.SIArray3.__module__ = 'feos.si' -quantity.SIArray4.__module__ = 'feos.si' - ", - None, - Some(m.dict()), - )?; +// py.run( +// "\ +// import sys +// quantity.SINumber.__module__ = 'feos.si' +// quantity.SIArray1.__module__ = 'feos.si' +// quantity.SIArray2.__module__ = 'feos.si' +// quantity.SIArray3.__module__ = 'feos.si' +// quantity.SIArray4.__module__ = 'feos.si' +// ", +// None, +// Some(m.dict()), +// )?; Ok(()) }