Skip to content

Commit

Permalink
Making it clearer how to use the electron donation factory methods an…
Browse files Browse the repository at this point in the history
…d updating the documentation with the new naming.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
johnmay authored and egonw committed Oct 22, 2013
1 parent f69a8bc commit af8b84c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/main/org/openscience/cdk/aromaticity/Aromaticity.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@
* </ul>
* <p/>
* This implementation allows configuration of these via an {@link
* ElectronDonation} model and {@link CycleFinder}.
* ElectronDonation} model and {@link CycleFinder}. To obtain an instance
* of the electron donation model use one of the factory methods,
* {@link ElectronDonation#cdk()}, {@link ElectronDonation#cdkAllowingExocyclic()},
* {@link ElectronDonation#daylight()} or {@link ElectronDonation#piBonds()}.
*
* <blockquote><pre>
* // mimics the old CDKHuckelAromaticityDetector which uses the CDK atom types
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdkAtomTypes(false),
* Cycles.cdkAromaticSet());
* ElectronDonation model = ElectronDonation.cdk();
* CycleFinder cycles = Cycles.cdkAromaticSet();
* Aromaticity aromaticity = new Aromaticity(model, cycles);
*
* // apply our configured model to each molecule, the CDK model
* // requires that atom types are perceived
Expand Down Expand Up @@ -122,11 +126,11 @@ public final class Aromaticity {
* <blockquote><pre>
*
* // mimics the CDKHuckelAromaticityDetector
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdkAtomTypes(false),
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdk(),
* Cycles.cdkAromaticSet());
*
* // mimics the DoubleBondAcceptingAromaticityDetector
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdkAtomTypes(true),
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdkAllowingExocyclic(),
* Cycles.cdkAromaticSet());
*
* // a good model for writing SMILES
Expand Down Expand Up @@ -155,7 +159,7 @@ public Aromaticity(ElectronDonation model,
* aromatic.
*
* <blockquote><pre>{@code
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdkAtomTypes(true),
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdk(),
* Cycles.all());
* IAtomContainer container = ...;
* try {
Expand Down Expand Up @@ -207,7 +211,7 @@ public Set<IBond> findBonds(IAtomContainer molecule) throws CDKException {
* flags. <p/>
*
* <blockquote><pre>
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdkAtomTypes(true),
* Aromaticity aromaticity = new Aromaticity(ElectronDonation.cdk(),
* Cycles.all());
* IAtomContainer container = ...;
* try {
Expand Down

0 comments on commit af8b84c

Please sign in to comment.