Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
JensKrumsieck committed Jun 20, 2023
2 parents 9903094 + 7a49ffe commit 8bb52bd
Show file tree
Hide file tree
Showing 101 changed files with 4,375 additions and 91,242 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
with:
proj-path: Directory.Build.props
- name: Pack
run: dotnet pack -c Release -o tmp -p:PackageVersion=${{steps.get-version.outputs.package-version}}-ci.${{ github.run_number }} --no-build --no-restore
run: dotnet pack -c Release -p:PackageVersion=${{steps.get-version.outputs.package-version}}-ci.${{ github.run_number }} --no-build --no-restore
- run: cd ../
- name: publish github
run: dotnet nuget push tmp\*.nupkg --skip-duplicate -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/JensKrumsieck/index.json
run: dotnet nuget push **\*.nupkg --skip-duplicate -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/JensKrumsieck/index.json
if: ${{ github.event_name == 'push' && github.repository_owner == 'JensKrumsieck' }}
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Pack
run: dotnet pack -c Release -o tmp --no-restore --no-build
run: dotnet pack -c Release --no-restore --no-build
- run: cd ../
- name: publish nuget
run: dotnet nuget push tmp\*.nupkg --skip-duplicate --no-symbols -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json
run: dotnet nuget push **\*.nupkg --skip-duplicate --no-symbols -k ${{secrets.NUGET_TOKEN}} -s https://api.nuget.org/v3/index.json
- name: publish github
run: dotnet nuget push tmp\*.nupkg --skip-duplicate --no-symbols -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/JensKrumsieck/index.json
run: dotnet nuget push **\*.nupkg --skip-duplicate --no-symbols -k ${{secrets.GITHUB_TOKEN}} -s https://nuget.pkg.github.com/JensKrumsieck/index.json
2 changes: 1 addition & 1 deletion ChemSharp.Molecules.Blazor/BlazorBond.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ChemSharp.Molecules.Blazor.Extension;
using ChemSharp.Molecules.Blazor.Extensions;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;

Expand Down
2 changes: 1 addition & 1 deletion ChemSharp.Molecules.Blazor/BlazorMolecule.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ChemSharp.Molecules.Blazor.Extension;
using ChemSharp.Molecules.Blazor.Extensions;
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Rendering;
using Microsoft.JSInterop;
Expand Down
4 changes: 2 additions & 2 deletions ChemSharp.Molecules.Blazor/BlazorMoleculeFactory.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using ChemSharp.Files;
using ChemSharp.Extensions;
using Microsoft.AspNetCore.Components.Forms;

namespace ChemSharp.Molecules.Blazor;
Expand All @@ -13,7 +13,7 @@ public static class BlazorMoleculeFactory
/// <returns></returns>
public static Molecule Create(IBrowserFile file, long maxFileSize = 8192000L)
{
var extension = FileHandler.GetExtension(file.Name);
var extension = FileUtil.GetExtension(file.Name);
var stream = file.OpenReadStream(maxFileSize);
return Molecule.FromStream(stream, extension);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.JSInterop;

namespace ChemSharp.Molecules.Blazor.Extension;
namespace ChemSharp.Molecules.Blazor.Extensions;

public static class JSInteropUtil
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Numerics;

namespace ChemSharp.Molecules.Blazor.Extension;
namespace ChemSharp.Molecules.Blazor.Extensions;

public static class MoleculeUtil
{
Expand Down
4 changes: 2 additions & 2 deletions ChemSharp.Molecules/ChemSharp.Molecules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Nodo" Version="0.0.1-alpha.1"/>
<PackageReference Include="System.Text.Json" Version="7.0.0"/>
<PackageReference Include="Nodo" Version="1.0.0"/>
<PackageReference Include="System.Text.Json" Version="7.0.2"/>
<ProjectReference Include="..\ChemSharp\ChemSharp.csproj"/>
<ProjectReference Include="..\Generators\ChemSharp.Molecules.Generator\ChemSharp.Molecules.Generator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
</ItemGroup>
Expand Down
63 changes: 1 addition & 62 deletions ChemSharp.Molecules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,65 +4,4 @@

[![NuGet Badge](https://buildstats.info/nuget/ChemSharp.Molecules?includePreReleases=true)](https://www.nuget.org/packages/ChemSharp.Molecules/)

Package for processing of molecule related files.

### Features

* Open and process Molecular files (see [Supported Filetypes](#supported-filetypes))
* Sum formula operations and elemental analysis calculation
* Using Elemental Data from https://github.com/JensKrumsieck/periodic-table
* Blazor
View: `ChemSharp.Molecules.Blazor` [![NuGet Badge](https://buildstats.info/nuget/ChemSharp.Molecules.Blazor?includePreReleases=true)](https://www.nuget.org/packages/ChemSharp.Molecules.Blazor/)

## Basic Usage

#### Create Molecules

Molecules can be created in a lot of ways. The easiest way is to use MoleculeFactory.Create, which accepts a string
path. Depending on the File extension the correct DataProvider is used to load the file.

```csharp
//Creates a molecule from cif file
const string path = "files/cif.cif";
var mol = MoleculeFactory.Create(path);
```

It is also possible to create a Molecule by using a specific DataProvider (e.g. if automatic detection fails or you only
want to support a selected number of file types)

```csharp
//You can also create molecules by selecting the provider yourself
const string path = "files/benzene.mol2";
var provider = new Mol2DataProvider(path);
var mol = new Molecule(provider);
```

You can also add [Atoms and Bonds](https://github.com/JensKrumsieck/ChemSharp/wiki/Element-Atom-Bond) as Lists if you
got the data from somewhere else.

```csharp
//...or by just adding the Atoms & Bonds as Lists
const string path = "files/cif.cif";
var provider = new CIFDataProvider(path);
var mol = new Molecule(provider.Atoms, provider.Bonds);
```

## Supported Files:

* **Import** (XYZ, CIF (crystallographic information file, CCDC), MOL2 (TRIPOS Mol2), PDB (Protein Data Bank file),
CDXML (Single Molecule only))
* **Export** (XYZ, MOL2)

<hr/>

#### Used Libraries:

* [MathNet.Numerics](https://github.com/mathnet/mathnet-numerics)
#### Compatibility

* .NET Standard 2.0, .NET Standard 2.1, .NET 5, .NET 6
* Unity (see [Wiki](https://github.com/JensKrumsieck/ChemSharp/wiki/Use-with-Unity)
<a href="https://github.com/JensKrumsieck/ChemSharp/wiki/Use-with-Unity"><img src="https://img.shields.io/badge/Unity-100000?logo=unity&logoColor=white"/></a>)
* Godot Engine (see [Wiki](https://github.com/JensKrumsieck/ChemSharp/wiki/Use-with-Godot-Engine) for Snippet)
* Blazor (see ChemSharp.Molecules.Blazor)
Package for processing of molecule related files.
64 changes: 0 additions & 64 deletions ChemSharp.Spectroscopy/DataProviders/BrukerEPRProvider.cs

This file was deleted.

141 changes: 0 additions & 141 deletions ChemSharp.Spectroscopy/DataProviders/BrukerNMRProvider.cs

This file was deleted.

Loading

0 comments on commit 8bb52bd

Please sign in to comment.