Quimify Opsin is an adaptation and translation to Spanish of OPSIN (Open Parser for Systematic IUPAC Nomenclature), a powerful parser for systematic IUPAC nomenclature. This project is intended to facilitate the generation of chemical structures from systematic IUPAC names in Spanish, and is used in Quimify as a library of quimifyapp/organic.
Build it:
String englishName = "2-methylpropanoic acid";
OpsinEnglish opsinEnglish = new OpsinEnglish(englishName);
String spanishName = "ácido 2-metilpropanoico";
OpsinSpanish opsinSpanish = new OpsinSpanish(spanishName);
Result:
if (opsinEnglish.isPresent()) {
opsinEnglish.getSmiles(); // CC(C(=O)O)C
opsinEnglish.getCml(); // Chemical Markup Language (too long)
}
if (opsinSpanish.isPresent()) {
opsinSpanish.getSmiles(); // CC(C(=O)O)C
opsinSpanish.getCml(); // Chemical Markup Language (too long)
}
Done before parsing names with OPSIN. For instance:
diethyl ether
→ ethyl ether
Done by editing resource files. For instance:
.../english/resources/functionalTerms.xml
<token value="[Br-]">bromide|bromid</token>
<token value="[Cl-]">chloride|chlorid</token>
.../spanish/resources/functionalTerms.xml
<token value="[Br-]">bromuro|brom</token><!--TRANSLATED-->
<token value="[Cl-]">cloruro|clor</token><!--TRANSLATED-->
Clone the repository and run Main
from module quimify-opsin-english
or quimify-opsin-spanish
using Java 11.
To use Quimify Opsin in your project, you can generate a JAR file with dependencies by running the Maven task package
with the command mvn package
. The JAR files will be located at quimify-opsin-english/target
and quimify-opsin-spanish/target
respectively.
Alternatively, download the latest release available.
Quimify OPSIN uses the opsin-core
module from OPSIN.
Do whatever you want with this code.
However, please be aware that our code relies on open-source dependencies, each with their own licenses and usage terms. Non-compliance with their licenses could have legal consequences.