Skip to content

Latest commit

 

History

History

myApp

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Instruction to Build Application using RDKit.DotNetWrap

Step by Step

mkdir new_app
cd new_app
mkdir new_app
cd new_app
dotnet new console
dotnet add package RDKit.DotNetWrap --version ${VERSION_OF_NUGET_PACKAGE}

Edit Program.cs.

using System;
using GraphMolWrap;
var smiles = "c1ccccc1C";
var mol = RWMol.MolFromSmiles(smiles);
var re_smi = RDKFuncs.MolToSmiles(mol);
Console.WriteLine($"Hello toluene, {re_smi}.");
dotnet build
bin/Debug/${YOUR_DOTNET_VERSION}/new_app
  • Above prints below.
Hello toluene, Cc1ccccc1.
  • If your are using .NET Standard on Linux, setting LD_LIBRARY_PATH is required.
cd bin/Debug/${YOUR_DOTNET_VERSION}
LD_LIBRARY_PATH=./runtimes/linux-x64/native:$LD_LIBRARY_PATH ./new_app

See create_and_run.bat for Windows or bash create_and_run.sh for Linux.

via Docker

At first place NuGet package here, and then do below. NuGet package is available on https://www.nuget.org/packages/RDKit.DotNetWrap/.

docker build --tag IMAGE_NAME -f Dockerfile .
docker run IMAGE_NAME

Appendix

Register local repository like below.

dotnet nuget add source /nuget-repo-directory --name local-repo