{"id":33106918,"url":"https://github.com/dan2097/opsin","last_synced_at":"2026-01-14T03:04:56.266Z","repository":{"id":42981095,"uuid":"253269900","full_name":"dan2097/opsin","owner":"dan2097","description":"Open Parser for Systematic IUPAC Nomenclature. Chemical name to structure conversion","archived":false,"fork":false,"pushed_at":"2025-12-20T16:06:39.000Z","size":60694,"stargazers_count":191,"open_issues_count":87,"forks_count":39,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-12-22T10:53:31.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://opsin.ch.cam.ac.uk","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dan2097.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-05T15:41:07.000Z","updated_at":"2025-12-20T16:06:43.000Z","dependencies_parsed_at":"2023-02-16T23:15:27.853Z","dependency_job_id":"5bd026b0-7eda-4fd4-96d8-d2b91851b166","html_url":"https://github.com/dan2097/opsin","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/dan2097/opsin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan2097%2Fopsin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan2097%2Fopsin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan2097%2Fopsin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan2097%2Fopsin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dan2097","download_url":"https://codeload.github.com/dan2097/opsin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dan2097%2Fopsin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-11-15T00:00:27.711Z","updated_at":"2026-01-14T03:04:56.257Z","avatar_url":"https://github.com/dan2097.png","language":"Java","readme":"[![Maven Central](https://img.shields.io/maven-central/v/uk.ac.cam.ch.opsin/opsin-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22uk.ac.cam.ch.opsin%22)\n[![Javadoc](https://javadoc.io/badge/uk.ac.cam.ch.opsin/opsin-core.svg)](https://javadoc.io/doc/uk.ac.cam.ch.opsin/opsin-core)\n[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/dan2097/opsin/workflows/Java%20CI%20with%20Maven/badge.svg)](https://github.com/dan2097/opsin/actions)\n\nOPSIN - Open Parser for Systematic IUPAC Nomenclature\n=====================================================\n__Version 2.8.0 (see [ReleaseNotes.txt](https://raw.githubusercontent.com/dan2097/opsin/master/ReleaseNotes.txt) for what's new in this version)__  \n__Source code: \u003chttps://github.com/dan2097/opsin\u003e__  \n__Web interface and informational site: \u003chttps://www.ebi.ac.uk/opsin/\u003e__  \n__License: [MIT License](https://opensource.org/licenses/MIT)__  \n\nOPSIN is a Java library for IUPAC name-to-structure conversion offering high recall and precision on organic chemical nomenclature. \n\nJava 8 (or higher) is required for OPSIN 2.8.0 \n\nSupported outputs are SMILES, CML (Chemical Markup Language) and InChI (IUPAC International Chemical Identifier)\n\n### Simple Usage Examples\n#### Convert a chemical name to SMILES\n`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -osmi input.txt output.txt`  \nwhere input.txt contains chemical name/s, one per line\n\n    NameToStructure nts = NameToStructure.getInstance();\n    String smiles = nts.parseToSmiles(\"acetamide\");\n\n#### Convert a chemical name to CML\n`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -ocml input.txt output.txt`  \nwhere input.txt contains chemical name/s, one per line\n\n    NameToStructure nts = NameToStructure.getInstance();\n    String cml = nts.parseToCML(\"acetamide\");\n\n#### Convert a chemical name to StdInChI/StdInChIKey/InChI with FixedH \n`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -ostdinchi input.txt output.txt`  \n`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -ostdinchikey input.txt output.txt`  \n`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -oinchi input.txt output.txt`  \nwhere input.txt contains chemical name/s, one per line\n\n    NameToInchi nti = new NameToInchi()\n    String stdInchi = nti.parseToStdInchi(\"acetamide\");\n    String stdInchiKey = nti.parseToStdInchiKey(\"acetamide\");\n    String inchi = nti.parseToInchi(\"acetamide\");\n\nNOTE: OPSIN's non-standard InChI includes an additional layer (FixedH) that indicates which tautomer the chemical name described. StdInChI aims to be tautomer independent.\n### Advanced Usage\nOPSIN 2.8.0 allows enabling of the following options:\n\n* allowRadicals: Allows substituents to be interpretable e.g. allows interpretation of \"ethyl\"\n* wildcardRadicals: If allowRadicals is enabled, this option uses atoms in the output to represent radicals: 'R' in CML and '*' in SMILES e.g. changes the output of ethyl from C[CH2] to CC\\*\n* detailedFailureAnalysis: Provides a potentially more accurate reason as to why a chemical name could not be parsed. This is done by parsing the chemical name from right to left. The trade-off for enabling this is slightly increased memory usage.\n* allowAcidsWithoutAcid: Allows interpretation of acids without the word acid e.g. \"acetic\"\n* allowUninterpretableStereo: Allows stereochemistry uninterpretable by OPSIN to be ignored (When used as a library the OpsinResult has a status of WARNING if stereochemistry was ignored)\n* verbose: Enables debugging output (command-line only). This option has the effect of lowering the logging threshold on the uk.ac.cam.ch.wwmm.opsin package to DEBUG.\n\nThe usage of these options on the command line is described in the command line's help dialog accessible via:\n`java -jar opsin-cli-2.8.0-jar-with-dependencies.jar -h`\n\nThese options may be controlled using the following code:\n\n    NameToStructure nts = NameToStructure.getInstance();\n    NameToStructureConfig ntsconfig = new NameToStructureConfig();\n    //a new NameToStructureConfig starts as a copy of OPSIN's default configuration\n    ntsconfig.setAllowRadicals(true);\n    OpsinResult result = nts.parseChemicalName(\"acetamide\", ntsconfig);\n    String cml = result.getCml();\n    String smiles = result.getSmiles();\n    String stdinchi = NameToInchi.convertResultToStdInChI(result);\n\n`result.getStatus()` may be checked to see if the conversion was successful.\nIf a structure was generated but OPSIN believes there may be a problem a status of WARNING is returned. Currently this may occur if the name appeared to be ambiguous or stereochemistry was ignored.\nBy default only optical rotation specification is ignored (this cannot be converted to stereo-configuration algorithmically).\n\nConvenience methods like `result.nameAppearsToBeAmbiguous()` may be used to check the cause of the warning.\n\nNOTE: (Std)InChI cannot be generated for polymers or radicals generated in combination with the wildcardRadicals option\n\n### Availability\nOPSIN is available as a standalone JAR from GitHub, \u003chttps://github.com/dan2097/opsin/releases\u003e  \n* `opsin-cli-2.8.0-jar-with-dependencies.jar` can be executed as a command-line application. It includes SMILES/CML/InChI support and bundles a logging implementation.\n* `opsin-core-2.8.0-jar-with-dependencies.jar` includes just SMILES/CML support.\n\nOPSIN is also available from the Maven Central Repository. \nFor SMILES/CML output support you would include:\n\n    \u003cdependency\u003e\n       \u003cgroupId\u003euk.ac.cam.ch.opsin\u003c/groupId\u003e\n       \u003cartifactId\u003eopsin-core\u003c/artifactId\u003e\n       \u003cversion\u003e2.8.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\nor if you also need InChI output support:\n\n    \u003cdependency\u003e\n       \u003cgroupId\u003euk.ac.cam.ch.opsin\u003c/groupId\u003e\n       \u003cartifactId\u003eopsin-inchi\u003c/artifactId\u003e\n       \u003cversion\u003e2.8.0\u003c/version\u003e\n    \u003c/dependency\u003e\n\n#### Building from source\nTo build OPSIN from source, download Maven 3 and OPSIN's source code.\n\nRunning `mvn package` in the root of OPSIN's source will build:\n\n| Artifact                                          | Location           | Description                                                       |\n|---------------------------------------------------|--------------------|-------------------------------------------------------------------|\n| opsin-cli-\\\u003cversion\\\u003e-jar-with-dependencies.jar   | opsin-cli/target   | Standalone command-line application with SMILES/CML/InChI support |\n| opsin-core-\\\u003cversion\\\u003e-jar-with-dependencies.jar  | opsin-core/target  | Library with SMILES/CML support                                   |\n| opsin-inchi-\\\u003cversion\\\u003e-jar-with-dependencies.jar | opsin-inchi/target | Library with SMILES/CML/InChI support                             |\n\n### About OPSIN\n\nThe workings of OPSIN are more fully described in:\n\n    Chemical Name to Structure: OPSIN, an Open Source Solution\n    Daniel M. Lowe, Peter T. Corbett, Peter Murray-Rust, Robert C. Glen\n    Journal of Chemical Information and Modeling 2011 51 (3), 739-753\n    https://doi.org/10.1021/ci100384d\n\nIf you use OPSIN in your work, then it would be great if you could cite us.\n\nThe following list broadly summarises what OPSIN can currently do and what will be worked on in the future.\n\n#### Supported nomenclature includes:\n* alkanes/alkenes/alkynes/heteroatom chains e.g. hexane, hex-1-ene, tetrasiloxane and their cyclic analogues e.g. cyclopropane\n* All IUPAC 1993 recommended rings\n* Trivial acids\n* Hantzsch-Widman e.g. 1,3-oxazole\n* Spiro systems\n* All von Baeyer rings e.g. bicyclo[2.2.2]octane\n* Hydro e.g. 2,3-dihydropyridine\n* Indicated hydrogen e.g. 1H-benzoimidazole\n* Heteroatom replacement\n* Specification of charge e.g. ium/ide/ylium/uide\n* Multiplicative nomenclature e.g. ethylenediaminetetraacetic acid\n* Conjunctive nomenclature e.g. cyclohexaneethanol\n* Fused ring systems e.g. imidazo[4,5-d]pyridine\n* Ring assemblies e.g. biphenyl\n* Most prefix and infix functional replacement nomenclature\n* The following functional classes: acetals, acids, alcohols, amides, anhydrides, anilides, azetidides, azides, bromides, chlorides,\ncyanates, cyanides, esters, di/tri/tetra esters, ethers, fluorides, fulminates, glycol ethers, glycols, hemiacetals, hemiketal,\nhydrazides, hydrazones, hydrides, hydroperoxides, hydroxides, imides, iodides, isocyanates, isocyanides, isoselenocyanates, isothiocyanates,\nketals, ketones, lactams, lactims, lactones, mercaptans, morpholides, oxides, oximes, peroxides, piperazides, piperidides, pyrrolidides,\nselenides, selenocyanates, selenoketones, selenolsselenosemicarbazones, selenones, selenoxides, selones, semicarbazones, sulfides, sulfones,\nsulfoxides, sultams, sultims, sultines, sultones, tellurides, telluroketones, tellurones, tellurosemicarbazones, telluroxides, thiocyanates,\nthioketones, thiols, thiosemicarbazones\n* Greek letters\n* Lambda convention\n* Amino Acids and derivatives\n* Structure-based polymer names e.g. poly(2,2'-diamino-5-hexadecylbiphenyl-3,3'-diyl)\n* Bridge prefixes e.g. methano\n* Specification of oxidation numbers and charge on elements\n* Perhalogeno terms\n* Subtractive prefixes: deoxy, dehydro, anhydro, demethyl, deamino\n* Stoichiometry ratios and mixture indicators\n* Nucleosides, (oligo)nucleotides and their esters\n* Carbohydrate nomenclature\n* Simple CAS names including inverted CAS names\n* Steroids including alpha/beta stereochemistry\n* Isotopic labelling\n* E/Z/R/S stereochemistry\n* cis/trans indicating relative stereochemistry on rings and as a synonym of E/Z\n\n#### Currently UNsupported nomenclature includes:\n* Other less common stereochemical terms\n* Most alkaloids/terpenoids\n* Natural product specific nomenclature operations\n\n### Developers and Contributors\n* Rich Apodaca\n* Albina Asadulina\n* Peter Corbett\n* Daniel Lowe (Current maintainer)\n* John Mayfield\n* Peter Murray-Rust\n* Noel O'Boyle\n* Mark Williamson\n\nThanks also to the many users who have contributed through suggestions and bug reporting.\n\n![YourKit Logo](https://www.yourkit.com/images/yklogo.png)\n\nOPSIN's developers use YourKit to profile and optimise code.\n\nYourKit supports open source projects with its full-featured Java Profiler.\nYourKit, LLC is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/index.jsp) and [YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/index.jsp), innovative and intelligent tools for profiling Java and .NET applications.\n\nGood Luck and let us know if you have problems, comments or suggestions!\nBugs may be reported on the project's [issue tracker](https://github.com/dan2097/opsin/issues).\n","funding_links":[],"categories":["Libraries"],"sub_categories":["Others"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan2097%2Fopsin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdan2097%2Fopsin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdan2097%2Fopsin/lists"}