Skip to content

Commit

Permalink
Bump Version to 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
JensKrumsieck committed May 20, 2021
1 parent c7d7574 commit 44c3d9b
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ChemSharp.Molecules/Bond.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public Bond(Atom a1, Atom a2)
/// <summary>
/// Returns Atoms as List to do LINQ
/// </summary>
public Atom[] Atoms => _atoms ??= new [] {Atom1, Atom2};
public Atom[] Atoms => _atoms ??= new[] { Atom1, Atom2 };

}
}
2 changes: 1 addition & 1 deletion ChemSharp.Molecules/ChemSharp.Molecules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Jens Krumsieck</Authors>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Version>1.0.5-dev3</Version>
<Version>1.0.6</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/JensKrumsieck/ChemSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/JensKrumsieck/ChemSharp</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion ChemSharp.Molecules/Extensions/AtomUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static int Saturation(this IEnumerable<Bond> bonds, Atom a)
public static IEnumerable<Atom> Neighbors(Atom a, IEnumerable<Bond> bonds) =>
bonds.Where(s => s.Atoms.Contains(a)).Select(s => s.Atoms.FirstOrDefault(b => !b.Equals(a)));

public static Dictionary<Atom, List<Atom>> BuildNeighborCache(IEnumerable<Atom> atoms, IEnumerable<Bond> bonds) =>
public static Dictionary<Atom, List<Atom>> BuildNeighborCache(IEnumerable<Atom> atoms, IEnumerable<Bond> bonds) =>
atoms.ToDictionary(a => a, a => Neighbors(a, bonds).ToList());
}
}
2 changes: 1 addition & 1 deletion ChemSharp.Rendering/ChemSharp.Rendering.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Jens Krumsieck</Authors>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/JensKrumsieck/ChemSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/JensKrumsieck/ChemSharp</RepositoryUrl>
Expand Down
1 change: 0 additions & 1 deletion ChemSharp.Rendering/Export/PovRayExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Numerics;

namespace ChemSharp.Rendering.Export
{
Expand Down
2 changes: 1 addition & 1 deletion ChemSharp.Rendering/Primitives/Cylinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion ChemSharp.Spectroscopy/ChemSharp.Spectroscopy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Jens Krumsieck</Authors>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/JensKrumsieck/ChemSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/JensKrumsieck/ChemSharp</RepositoryUrl>
Expand Down
14 changes: 7 additions & 7 deletions ChemSharp.Tests/Molecules/BondTests.cs
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down Expand Up @@ -85,7 +85,7 @@ public void AtomWithNoNeighborsDoesNotFail()
{
var atom = new Atom("Nb");
var bonds = new List<Bond>();
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);
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions ChemSharp.Tests/Molecules/MacrocycleDetectionTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Atom> NonMetalNonDeadEnd(Atom atom) => molecule.NonMetalNeighbors(atom)?.Where(a => !deadEnds.Contains(a.Symbol));

var parts = new List<IEnumerable<Atom>>();
Expand All @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion ChemSharp.UnitConversion/ChemSharp.UnitConversion.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<Authors>Jens Krumsieck</Authors>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/JensKrumsieck/ChemSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/JensKrumsieck/ChemSharp</RepositoryUrl>
Expand Down
2 changes: 1 addition & 1 deletion ChemSharp/ChemSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Authors>Jens Krumsieck</Authors>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<LangVersion>9.0</LangVersion>
<Version>1.0.5</Version>
<Version>1.0.6</Version>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/JensKrumsieck/ChemSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/JensKrumsieck/ChemSharp</RepositoryUrl>
Expand Down

0 comments on commit 44c3d9b

Please sign in to comment.