Skip to content

Commit

Permalink
Formatting only - to make changes easier to follow
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay authored and egonw committed Dec 18, 2021
1 parent ccf5c24 commit d3eb48e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 35 deletions.
Expand Up @@ -98,7 +98,6 @@
* </b>
*
* @author Sam Adams
*
* @cdk.module inchi
* @cdk.githash
*/
Expand All @@ -123,10 +122,10 @@ public class InChIGenerator {
* <p>Reads atoms, bonds etc from atom container and converts to format
* InChI library requires, then calls the library.
*
* @param atomContainer AtomContainer to generate InChI for.
* @param atomContainer AtomContainer to generate InChI for.
* @param ignoreAromaticBonds if aromatic bonds should be treated as bonds of type single and double
* @throws org.openscience.cdk.exception.CDKException if there is an
* error during InChI generation
* error during InChI generation
*/
protected InChIGenerator(IAtomContainer atomContainer, boolean ignoreAromaticBonds) throws CDKException {
this(atomContainer, Collections.singletonList(INCHI_OPTION.AuxNone), ignoreAromaticBonds);
Expand All @@ -138,10 +137,10 @@ protected InChIGenerator(IAtomContainer atomContainer, boolean ignoreAromaticBon
* <p>Reads atoms, bonds etc from atom container and converts to format
* InChI library requires, then calls the library.
*
* @param atomContainer AtomContainer to generate InChI for.
* @param options Space delimited string of options to pass to InChI library.
* Each option may optionally be preceded by a command line
* switch (/ or -).
* @param atomContainer AtomContainer to generate InChI for.
* @param options Space delimited string of options to pass to InChI library.
* Each option may optionally be preceded by a command line
* switch (/ or -).
* @param ignoreAromaticBonds if aromatic bonds should be treated as bonds of type single and double
* @throws CDKException
*/
Expand All @@ -162,8 +161,8 @@ protected InChIGenerator(IAtomContainer atomContainer, String options, boolean i
* <p>Reads atoms, bonds etc from atom container and converts to format
* InChI library requires, then calls the library.
*
* @param atomContainer AtomContainer to generate InChI for.
* @param options List of INCHI_OPTION.
* @param atomContainer AtomContainer to generate InChI for.
* @param options List of INCHI_OPTION.
* @param ignoreAromaticBonds if aromatic bonds should be treated as bonds of type single and double
* @throws CDKException
*/
Expand All @@ -183,7 +182,7 @@ protected InChIGenerator(IAtomContainer atomContainer, List<INCHI_OPTION> option
* InChI library requires, then places call for the library to generate
* the InChI.
*
* @param atomContainer AtomContainer to generate InChI for.
* @param atomContainer AtomContainer to generate InChI for.
* @throws CDKException
*/
private void generateInchiFromCDKAtomContainer(IAtomContainer atomContainer, boolean ignore) throws CDKException {
Expand Down Expand Up @@ -285,7 +284,7 @@ private void generateInchiFromCDKAtomContainer(IAtomContainer atomContainer, boo

// Get bond order
INCHI_BOND_TYPE order;
Order bo = bond.getOrder();
Order bo = bond.getOrder();
if (!ignore && bond.getFlag(CDKConstants.ISAROMATIC)) {
order = INCHI_BOND_TYPE.ALTERN;
} else if (bo == Order.SINGLE) {
Expand Down
Expand Up @@ -60,7 +60,6 @@
* </ul>
*
* @author Sam Adams
*
* @cdk.module inchi
* @cdk.githash
*/
Expand All @@ -71,7 +70,7 @@ public class InChIGeneratorFactory {
/**
* If the CDK aromaticity flag should be ignored and the bonds treated solely as single and double bonds.
*/
private boolean ignoreAromaticBonds = true;
private boolean ignoreAromaticBonds = true;

/**
* <p>Constructor for InChIGeneratorFactory. Ensures that native code
Expand All @@ -94,7 +93,7 @@ private InChIGeneratorFactory() throws CDKException {
*
* @return the one <code>InChIGeneratorFactory</code> instance
* @throws CDKException if unable to load native code when attempting
* to create the factory
* to create the factory
*/
public static InChIGeneratorFactory getInstance() throws CDKException {
synchronized (InChIGeneratorFactory.class) {
Expand All @@ -110,14 +109,14 @@ public static InChIGeneratorFactory getInstance() throws CDKException {
* INCHI_BOND_TYPE.ALTERN is considered special in contrast to single, double, and triple bonds,
* and is not bulletproof. If the molecule has clearly defined single and double bonds,
* the option can be used to force the class not to use the alternating bond type.
*
* <p>
* http://www.inchi-trust.org/fileadmin/user_upload/html/inchifaq/inchi-faq.html#16.3
*
* @param ignore if aromatic bonds should be treated as bonds of type single and double
* @deprecated "the use of aromatic bonds is strongly discouraged" - InChI
* FAQ, the InChI will fail for many compounds if ignore
* aromatic bonds is not enabled and the compound have aromatic
* flags.
* FAQ, the InChI will fail for many compounds if ignore
* aromatic bonds is not enabled and the compound have aromatic
* flags.
*/
@Deprecated
public void setIgnoreAromaticBonds(boolean ignore) {
Expand All @@ -139,7 +138,7 @@ public boolean getIgnoreAromaticBonds() {
* generated by this method, please use {@link #getInChIGenerator(IAtomContainer, List)}
* with no options specified if you would like to generate AuxInfo.
*
* @param container AtomContainer to generate InChI for.
* @param container AtomContainer to generate InChI for.
* @return the InChI generator object
* @throws CDKException if the generator cannot be instantiated
*/
Expand All @@ -150,8 +149,8 @@ public InChIGenerator getInChIGenerator(IAtomContainer container) throws CDKExce
/**
* Gets InChI generator for CDK IAtomContainer.
*
* @param container AtomContainer to generate InChI for.
* @param options String of options for InChI generation.
* @param container AtomContainer to generate InChI for.
* @param options String of options for InChI generation.
* @return the InChI generator object
* @throws CDKException if the generator cannot be instantiated
*/
Expand All @@ -162,10 +161,10 @@ public InChIGenerator getInChIGenerator(IAtomContainer container, String options
/**
* Gets InChI generator for CDK IAtomContainer.
*
* @param container AtomContainer to generate InChI for.
* @param options List of options (net.sf.jniinchi.INCHI_OPTION) for InChI generation.
* @param container AtomContainer to generate InChI for.
* @param options List of options (net.sf.jniinchi.INCHI_OPTION) for InChI generation.
* @return the InChI generator object
* @throws CDKException if the generator cannot be instantiated
* @throws CDKException if the generator cannot be instantiated
*/
public InChIGenerator getInChIGenerator(IAtomContainer container, List<INCHI_OPTION> options) throws CDKException {
if (options == null) throw new IllegalArgumentException("Null options");
Expand All @@ -175,10 +174,10 @@ public InChIGenerator getInChIGenerator(IAtomContainer container, List<INCHI_OPT
/**
* Gets structure generator for an InChI string.
*
* @param inchi InChI to generate structure from.
* @param inchi InChI to generate structure from.
* @param builder the builder to use
* @return the InChI structure generator object
* @throws CDKException if the generator cannot be instantiated
* @return the InChI structure generator object
* @throws CDKException if the generator cannot be instantiated
*/
public InChIToStructure getInChIToStructure(String inchi, IChemObjectBuilder builder) throws CDKException {
return (new InChIToStructure(inchi, builder));
Expand All @@ -187,11 +186,11 @@ public InChIToStructure getInChIToStructure(String inchi, IChemObjectBuilder bui
/**
* <p>Gets structure generator for an InChI string.
*
* @param inchi InChI to generate structure from.
* @param inchi InChI to generate structure from.
* @param builder the builder to employ
* @param options String of options for structure generation.
* @return the InChI structure generator object
* @throws CDKException if the generator cannot be instantiated
* @param options String of options for structure generation.
* @return the InChI structure generator object
* @throws CDKException if the generator cannot be instantiated
*/
public InChIToStructure getInChIToStructure(String inchi, IChemObjectBuilder builder, String options)
throws CDKException {
Expand All @@ -201,11 +200,11 @@ public InChIToStructure getInChIToStructure(String inchi, IChemObjectBuilder bui
/**
* <p>Gets structure generator for an InChI string.
*
* @param inchi InChI to generate structure from.
* @param options List of options (net.sf.jniinchi.INCHI_OPTION) for structure generation.
* @param inchi InChI to generate structure from.
* @param options List of options (net.sf.jniinchi.INCHI_OPTION) for structure generation.
* @param builder the builder to employ
* @return the InChI structure generator object
* @throws CDKException if the generator cannot be instantiated
* @return the InChI structure generator object
* @throws CDKException if the generator cannot be instantiated
*/
public InChIToStructure getInChIToStructure(String inchi, IChemObjectBuilder builder, List<String> options)
throws CDKException {
Expand Down

0 comments on commit d3eb48e

Please sign in to comment.