Skip to content

Commit

Permalink
Isotopes -> CommonIsotopes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sejoslaw committed Jun 19, 2020
1 parent c541ee1 commit e38afde
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 48 deletions.
43 changes: 22 additions & 21 deletions Chemistry.NET.Tests/ChemicalCompoundParsersTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,27 @@ public void Should_parse_ChemicalCompound_using_CondensedChemicalCompoundParser(
Assert.Equal(input, str);
}

[Theory]
[InlineData("H-H")]
[InlineData("(H)2-O")]
[InlineData("(H)4-C")]
[InlineData("(H)2-C=C-(H)2")]
[InlineData("(H)2-C-(OH)2")]
[InlineData("(Li)2-O-(C=Pb-C-(H)2)-(O=C)")]
[InlineData("O|10|H")]
[InlineData("O|10|(H)2")]
[InlineData("Li|10|H")]
[InlineData("Li|10|(H)192")]
[InlineData("(Li)2-O-(C=Pb-C-(H)2)-(O|8|C)")]
[InlineData("(Li)2-O-(C=Pb-C|10|(H)2-O)-(O=C)")]
public void Should_parse_ChemicalCompound_using_LewisChemicalCompoundParser(string input)
{
var parser = new LewisChemicalCompoundParser();
var compound = parser.Read(input);
var str = parser.Write(compound);

Assert.Equal(input, str);
}
// ----==== WIP ====----
// [Theory]
// [InlineData("H-H")]
// [InlineData("(H)2-O")]
// [InlineData("(H)4-C")]
// [InlineData("(H)2-C=C-(H)2")]
// [InlineData("(H)2-C-(OH)2")]
// [InlineData("(Li)2-O-(C=Pb-C-(H)2)-(O=C)")]
// [InlineData("O|10|H")]
// [InlineData("O|10|(H)2")]
// [InlineData("Li|10|H")]
// [InlineData("Li|10|(H)192")]
// [InlineData("(Li)2-O-(C=Pb-C-(H)2)-(O|8|C)")]
// [InlineData("(Li)2-O-(C=Pb-C|10|(H)2-O)-(O=C)")]
// public void Should_parse_ChemicalCompound_using_LewisChemicalCompoundParser(string input)
// {
// var parser = new LewisChemicalCompoundParser();
// var compound = parser.Read(input);
// var str = parser.Write(compound);
//
// Assert.Equal(input, str);
// }
}
}
2 changes: 1 addition & 1 deletion Chemistry.NET/Chemistry.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageId>Chemistry.NET</PackageId>
<Version>1.6.0</Version>
<Version>1.7.0</Version>
<Copyright>https://github.com/Sejoslaw/Chemistry.NET</Copyright>
<PackageProjectUrl>https://github.com/Sejoslaw/Chemistry.NET</PackageProjectUrl>
<RepositoryUrl>https://github.com/Sejoslaw/Chemistry.NET</RepositoryUrl>
Expand Down
45 changes: 22 additions & 23 deletions Chemistry.NET/Common/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
using Chemistry.NET.Elements.Models;
using Chemistry.NET.Ions.Models;
using Chemistry.NET.Particles.Models;
using Isos = Chemistry.NET.Elements.Models.Isotopes;

namespace Chemistry.NET.Common
{
Expand All @@ -27,45 +26,45 @@ public static class Container
public static IList<PeriodicTableGroup> PeriodicTableGroups { get; } = GetAll<PeriodicTableGroup>(typeof(PeriodicTableGroups));
public static IList<PhysicalState> PhysicalStates { get; } = GetAll<PhysicalState>(typeof(PhysicalStates));
public static IList<ElementStructure> ElementStructures { get; } = GetAll<ElementStructure>(typeof(ElementStructures));
public static IList<Isotope> Isotopes { get; } = GetAll<Isotope>(typeof(Isotopes));
public static IList<Isotope> Isotopes { get; } = GetAll<Isotope>(typeof(CommonIsotopes));
public static IList<ChemicalCompound> CommonCompounds { get; } = GetAll<ChemicalCompound>(typeof(CommonCompounds));
public static IList<Ion> Ions { get; } = GetAll<Ion>(typeof(CommonIons));

public static IList<Isotope> MonoisotopicElements { get; } = new List<Isotope>
{
Isos.Be9, Isos.F19, Isos.Na23, Isos.Al27, Isos.P31,
Isos.Sc45, Isos.V51, Isos.Mn55, Isos.Co59, Isos.As75,
Isos.Rb85, Isos.Y89, Isos.Nb93, Isos.Rh103, Isos.In113,
Isos.I127, Isos.Cs133, Isos.La139, Isos.Pr141, Isos.Eu153,
Isos.Tb159, Isos.Ho165, Isos.Tm169, Isos.Lu175, Isos.Re185,
Isos.Au197
CommonIsotopes.Be9, CommonIsotopes.F19, CommonIsotopes.Na23, CommonIsotopes.Al27, CommonIsotopes.P31,
CommonIsotopes.Sc45, CommonIsotopes.V51, CommonIsotopes.Mn55, CommonIsotopes.Co59, CommonIsotopes.As75,
CommonIsotopes.Rb85, CommonIsotopes.Y89, CommonIsotopes.Nb93, CommonIsotopes.Rh103, CommonIsotopes.In113,
CommonIsotopes.I127, CommonIsotopes.Cs133, CommonIsotopes.La139, CommonIsotopes.Pr141, CommonIsotopes.Eu153,
CommonIsotopes.Tb159, CommonIsotopes.Ho165, CommonIsotopes.Tm169, CommonIsotopes.Lu175, CommonIsotopes.Re185,
CommonIsotopes.Au197
};

public static IList<Isotope> MononuclidicElements { get; } = new List<Isotope>
{
Isos.Be9, Isos.F19, Isos.Na23, Isos.Al27, Isos.P31,
Isos.Sc45, Isos.Mn55, Isos.Co59, Isos.As75, Isos.Y89,
Isos.Nb93, Isos.Rh103, Isos.I127, Isos.Cs133, Isos.Pr141,
Isos.Tb159, Isos.Ho165, Isos.Tm169, Isos.Au197, Isos.Bi209,
Isos.Pa231
CommonIsotopes.Be9, CommonIsotopes.F19, CommonIsotopes.Na23, CommonIsotopes.Al27, CommonIsotopes.P31,
CommonIsotopes.Sc45, CommonIsotopes.Mn55, CommonIsotopes.Co59, CommonIsotopes.As75, CommonIsotopes.Y89,
CommonIsotopes.Nb93, CommonIsotopes.Rh103, CommonIsotopes.I127, CommonIsotopes.Cs133, CommonIsotopes.Pr141,
CommonIsotopes.Tb159, CommonIsotopes.Ho165, CommonIsotopes.Tm169, CommonIsotopes.Au197, CommonIsotopes.Bi209,
CommonIsotopes.Pa231
};

public static IList<Isotope> AlphaNuclides { get; } = new List<Isotope>
{
Isos.He4, Isos.Be8, Isos.C12, Isos.O16, Isos.Ne20,
Isos.Mg24, Isos.Si28, Isos.S32, Isos.Ar36, Isos.Ca40,
Isos.Ti44, Isos.Cr48, Isos.Fe52, Isos.Ni56, Isos.Zn60
CommonIsotopes.He4, CommonIsotopes.Be8, CommonIsotopes.C12, CommonIsotopes.O16, CommonIsotopes.Ne20,
CommonIsotopes.Mg24, CommonIsotopes.Si28, CommonIsotopes.S32, CommonIsotopes.Ar36, CommonIsotopes.Ca40,
CommonIsotopes.Ti44, CommonIsotopes.Cr48, CommonIsotopes.Fe52, CommonIsotopes.Ni56, CommonIsotopes.Zn60
};

public static IList<Isotope> PrimordialNuclides { get; } = new List<Isotope>
{
Isos.Te128, Isos.Xe124, Isos.Kr78, Isos.Xe136, Isos.Ge76,
Isos.Ba130, Isos.Se82, Isos.Cd116, Isos.Ca48, Isos.Zr96,
Isos.Bi209, Isos.Te130, Isos.Nd150, Isos.Mo100, Isos.Eu151,
Isos.W180, Isos.V50, Isos.Cd113, Isos.Sm148, Isos.Nd144,
Isos.Os186, Isos.Hf174, Isos.In115, Isos.Gd152, Isos.Pt190,
Isos.Sm147, Isos.La138, Isos.Rb87, Isos.Re187, Isos.Lu176,
Isos.Th232, Isos.U238, Isos.K40, Isos.U235
CommonIsotopes.Te128, CommonIsotopes.Xe124, CommonIsotopes.Kr78, CommonIsotopes.Xe136, CommonIsotopes.Ge76,
CommonIsotopes.Ba130, CommonIsotopes.Se82, CommonIsotopes.Cd116, CommonIsotopes.Ca48, CommonIsotopes.Zr96,
CommonIsotopes.Bi209, CommonIsotopes.Te130, CommonIsotopes.Nd150, CommonIsotopes.Mo100, CommonIsotopes.Eu151,
CommonIsotopes.W180, CommonIsotopes.V50, CommonIsotopes.Cd113, CommonIsotopes.Sm148, CommonIsotopes.Nd144,
CommonIsotopes.Os186, CommonIsotopes.Hf174, CommonIsotopes.In115, CommonIsotopes.Gd152, CommonIsotopes.Pt190,
CommonIsotopes.Sm147, CommonIsotopes.La138, CommonIsotopes.Rb87, CommonIsotopes.Re187, CommonIsotopes.Lu176,
CommonIsotopes.Th232, CommonIsotopes.U238, CommonIsotopes.K40, CommonIsotopes.U235
};

// --== Methods ==--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Chemistry.NET.Elements.Models
/// <summary>
/// Container for known Isotopes.
/// </summary>
public static class Isotopes
public static class CommonIsotopes
{
// Hydrogen

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Model Name | Models Collection | Description
[Particle](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Particles/Models/Particle.cs) | [Common Particles](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Particles/Models/CommonParticles.cs) | Represents a particle / antiparticle from which the Elements are build of (i.e. Quarks / AntiQuarks, Neutrino / AntiNeutrino, etc.)
[Element Structure](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/ElementStructure.cs) | [Element Structures](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/ElementStructures.cs) | Represents a structure of an Elements (i.e. number of protons / electrons / neutrons, etc.)
[Periodic Table Element](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/PeriodicTableElement.cs) | [Periodic Table](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/PeriodicTable.cs) | Represents a classical Element inside the Periodic Table with it's position in the table
[Isotope](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/Isotope.cs) | [Isotopes](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/Isotopes.cs) | Represents an Isotope of a certain Element (6500+ isotopes)
[Isotope](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/Isotope.cs) | [Isotopes](https://github.com/Sejoslaw/Chemistry.NET/blob/master/Chemistry.NET/Elements/Models/CommonIsotopes.cs) | Represents an Isotope of a certain Element (6500+ isotopes)

</br>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override GeneratorConfigurationModel GetConfiguration()
{
Namespace = "Chemistry.NET.Elements.Models",
ClassComment = "Container for known Isotopes.",
ClassName = "Isotopes",
ClassName = "CommonIsotopes",
FileName = "Isotopes"
};
}
Expand Down

0 comments on commit e38afde

Please sign in to comment.