From 44c3d9b20ba32900a57765be7cf8bd1f9a9506b9 Mon Sep 17 00:00:00 2001 From: Jens Krumsieck Date: Thu, 20 May 2021 19:22:56 +0200 Subject: [PATCH] Bump Version to 1.0.6 --- ChemSharp.Molecules/Bond.cs | 2 +- ChemSharp.Molecules/ChemSharp.Molecules.csproj | 2 +- ChemSharp.Molecules/Extensions/AtomUtil.cs | 2 +- ChemSharp.Rendering/ChemSharp.Rendering.csproj | 2 +- ChemSharp.Rendering/Export/PovRayExporter.cs | 1 - ChemSharp.Rendering/Primitives/Cylinder.cs | 2 +- .../ChemSharp.Spectroscopy.csproj | 2 +- ChemSharp.Tests/Molecules/BondTests.cs | 14 +++++++------- .../Molecules/MacrocycleDetectionTest.cs | 4 ++-- .../ChemSharp.UnitConversion.csproj | 2 +- ChemSharp/ChemSharp.csproj | 2 +- 11 files changed, 17 insertions(+), 18 deletions(-) diff --git a/ChemSharp.Molecules/Bond.cs b/ChemSharp.Molecules/Bond.cs index d7d806e..7a87df3 100644 --- a/ChemSharp.Molecules/Bond.cs +++ b/ChemSharp.Molecules/Bond.cs @@ -33,7 +33,7 @@ public Bond(Atom a1, Atom a2) /// /// Returns Atoms as List to do LINQ /// - public Atom[] Atoms => _atoms ??= new [] {Atom1, Atom2}; + public Atom[] Atoms => _atoms ??= new[] { Atom1, Atom2 }; } } diff --git a/ChemSharp.Molecules/ChemSharp.Molecules.csproj b/ChemSharp.Molecules/ChemSharp.Molecules.csproj index 7ed3c3c..612e2b2 100644 --- a/ChemSharp.Molecules/ChemSharp.Molecules.csproj +++ b/ChemSharp.Molecules/ChemSharp.Molecules.csproj @@ -5,7 +5,7 @@ Jens Krumsieck netstandard2.0;netstandard2.1;net5.0 latest - 1.0.5-dev3 + 1.0.6 true https://github.com/JensKrumsieck/ChemSharp https://github.com/JensKrumsieck/ChemSharp diff --git a/ChemSharp.Molecules/Extensions/AtomUtil.cs b/ChemSharp.Molecules/Extensions/AtomUtil.cs index 4df0a54..c837eee 100644 --- a/ChemSharp.Molecules/Extensions/AtomUtil.cs +++ b/ChemSharp.Molecules/Extensions/AtomUtil.cs @@ -82,7 +82,7 @@ public static int Saturation(this IEnumerable bonds, Atom a) public static IEnumerable Neighbors(Atom a, IEnumerable bonds) => bonds.Where(s => s.Atoms.Contains(a)).Select(s => s.Atoms.FirstOrDefault(b => !b.Equals(a))); - public static Dictionary> BuildNeighborCache(IEnumerable atoms, IEnumerable bonds) => + public static Dictionary> BuildNeighborCache(IEnumerable atoms, IEnumerable bonds) => atoms.ToDictionary(a => a, a => Neighbors(a, bonds).ToList()); } } \ No newline at end of file diff --git a/ChemSharp.Rendering/ChemSharp.Rendering.csproj b/ChemSharp.Rendering/ChemSharp.Rendering.csproj index f539ab2..b5276ff 100644 --- a/ChemSharp.Rendering/ChemSharp.Rendering.csproj +++ b/ChemSharp.Rendering/ChemSharp.Rendering.csproj @@ -5,7 +5,7 @@ Jens Krumsieck netstandard2.0;netstandard2.1;net5.0 latest - 1.0.5 + 1.0.6 true https://github.com/JensKrumsieck/ChemSharp https://github.com/JensKrumsieck/ChemSharp diff --git a/ChemSharp.Rendering/Export/PovRayExporter.cs b/ChemSharp.Rendering/Export/PovRayExporter.cs index 529ee34..e65880e 100644 --- a/ChemSharp.Rendering/Export/PovRayExporter.cs +++ b/ChemSharp.Rendering/Export/PovRayExporter.cs @@ -6,7 +6,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using System.Numerics; namespace ChemSharp.Rendering.Export { diff --git a/ChemSharp.Rendering/Primitives/Cylinder.cs b/ChemSharp.Rendering/Primitives/Cylinder.cs index def2926..5162a4e 100644 --- a/ChemSharp.Rendering/Primitives/Cylinder.cs +++ b/ChemSharp.Rendering/Primitives/Cylinder.cs @@ -9,6 +9,6 @@ public class Cylinder public float Radius { get; set; } = 1f; - public Vector3 Color { get; set; } = new (1f, 0, 0); + public Vector3 Color { get; set; } = new(1f, 0, 0); } } diff --git a/ChemSharp.Spectroscopy/ChemSharp.Spectroscopy.csproj b/ChemSharp.Spectroscopy/ChemSharp.Spectroscopy.csproj index b936d68..aae1fcf 100644 --- a/ChemSharp.Spectroscopy/ChemSharp.Spectroscopy.csproj +++ b/ChemSharp.Spectroscopy/ChemSharp.Spectroscopy.csproj @@ -5,7 +5,7 @@ Jens Krumsieck netstandard2.0;netstandard2.1;net5.0 latest - 1.0.5 + 1.0.6 true https://github.com/JensKrumsieck/ChemSharp https://github.com/JensKrumsieck/ChemSharp diff --git a/ChemSharp.Tests/Molecules/BondTests.cs b/ChemSharp.Tests/Molecules/BondTests.cs index cb0a2fe..e896bb5 100644 --- a/ChemSharp.Tests/Molecules/BondTests.cs +++ b/ChemSharp.Tests/Molecules/BondTests.cs @@ -1,9 +1,9 @@ -using System.Collections.Generic; -using System.Linq; -using System.Numerics; -using ChemSharp.Molecules; +using ChemSharp.Molecules; using ChemSharp.Molecules.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Collections.Generic; +using System.Linq; +using System.Numerics; namespace ChemSharp.Tests.Molecules { @@ -85,7 +85,7 @@ public void AtomWithNoNeighborsDoesNotFail() { var atom = new Atom("Nb"); var bonds = new List(); - var mol = new Molecule(new[] {atom}, bonds); + var mol = new Molecule(new[] { atom }, bonds); var n = mol.NonMetalNeighbors(atom); Assert.IsNotNull(n); Assert.AreEqual(n.Count(), 0); @@ -97,8 +97,8 @@ public void PtCorDoesNotFail() //Abraham B. Alemayehu, Hugo Vazquez-Lima, Christine M. Beavers, Kevin J. Gagnon, Jesper Bendix, Abhik Ghosh, //Chemical Communications, 2014, 50, 11093, //DOI: 10.1039/C4CC02548B - const string file = "files/ptcor.mol2"; - + const string file = "files/ptcor.mol2"; + var mol = MoleculeFactory.Create(file); //remember caching is on! foreach (var a in mol.Atoms) diff --git a/ChemSharp.Tests/Molecules/MacrocycleDetectionTest.cs b/ChemSharp.Tests/Molecules/MacrocycleDetectionTest.cs index a867090..056a155 100644 --- a/ChemSharp.Tests/Molecules/MacrocycleDetectionTest.cs +++ b/ChemSharp.Tests/Molecules/MacrocycleDetectionTest.cs @@ -54,7 +54,7 @@ private static async Task RunTest(string path, int size, bool useCache = true) private static void Detect(Molecule molecule, int size) { var deadEnds = Element.DesiredSaturation.Where(s => s.Value == 1).Select(s => s.Key).ToList(); - + IEnumerable NonMetalNonDeadEnd(Atom atom) => molecule.NonMetalNeighbors(atom)?.Where(a => !deadEnds.Contains(a.Symbol)); var parts = new List>(); @@ -63,7 +63,7 @@ private static void Detect(Molecule molecule, int size) { var connected = fig.Distinct().ToArray(); connected = connected.Where(s => s.IsNonMetal && s.Symbol != "H").ToArray(); - if(connected.Length >= size) parts.Add(connected); + if (connected.Length >= size) parts.Add(connected); } foreach (var fig in parts.Distinct()) diff --git a/ChemSharp.UnitConversion/ChemSharp.UnitConversion.csproj b/ChemSharp.UnitConversion/ChemSharp.UnitConversion.csproj index bb73c68..00e7d36 100644 --- a/ChemSharp.UnitConversion/ChemSharp.UnitConversion.csproj +++ b/ChemSharp.UnitConversion/ChemSharp.UnitConversion.csproj @@ -4,7 +4,7 @@ Jens Krumsieck netstandard2.0;netstandard2.1;net5.0 latest - 1.0.5 + 1.0.6 true https://github.com/JensKrumsieck/ChemSharp https://github.com/JensKrumsieck/ChemSharp diff --git a/ChemSharp/ChemSharp.csproj b/ChemSharp/ChemSharp.csproj index e31d8b5..4b4054c 100644 --- a/ChemSharp/ChemSharp.csproj +++ b/ChemSharp/ChemSharp.csproj @@ -5,7 +5,7 @@ Jens Krumsieck netstandard2.0;netstandard2.1;net5.0 9.0 - 1.0.5 + 1.0.6 true https://github.com/JensKrumsieck/ChemSharp https://github.com/JensKrumsieck/ChemSharp