Custom Structure Checker and Fixer in JPC¶
Create custom structure checker¶
Based on the documentation available here, you can create a custom structure checker action in Java programing language. As a result of your development, you need to get a jar file which contains the necessary action. The created jar file must be referenced in externalcheckersfixers.xml configuration file which is stored where it is defined in the jchem-psql configuration file.
Artifacts¶
- jar file containing your custom standardizer action
Where to place the artifacts¶
- Edit /etc/default/jchem-psql file
Add the next line (example only) - defining the place of the externalcheckersfixers.xml - to the list of the
JCHEM_PSQL_OPTS- in the jchem-psql file:
Take care, use the absolute path of the xml file in thefield.
- Move the externalcheckersfixers.xml file in the above defined place and make it readable.
The absolute path of the above generated jar file is defined in the externalcheckersfixers.xml.
Example:
Move the jar file in the above defined place and make it readable.
Use the custom structure checker from cartridge¶
- Stop Cartridge service.
sudo service jchem-psql stop
- Start Cartridge service
sudo service jchem-psql start
The cartridge is ready for use the custom structure checker and fixer:
The action string of the custom checker/fixer is defined at Java code level.
In place of the action string, the checker configuration xml (not the externalcheckersfixers.xml) can also be used. See examples in Chemical Terms/Structure checkers documentation page.