Skip to content

Commit

Permalink
Merge pull request FelixBaensch#25 from FelixBaensch/efgf-artifact-in…
Browse files Browse the repository at this point in the history
…tegration

EFGF artifact integration and dependency updates
  • Loading branch information
JonasSchaub authored Dec 20, 2023
2 parents a8118dd + 915295a commit 97f5afa
Show file tree
Hide file tree
Showing 39 changed files with 185 additions and 3,245 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name: Java CI with Gradle

on:
push:
branches: [ "master", "dev-jonas" ]
branches: [ "master", "dev-jonas", "production", "efgf-artifact-integration" ]
pull_request:
branches: [ "master" ]

Expand All @@ -26,7 +26,7 @@ jobs:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'
- name: Change wrapper permissions
run: chmod +x ./gradlew
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ molecular fragmentation and substructure analysis. The Java/JavaFX rich-client a
functions for visualising the fragmentation results of individual compounds or entire compound sets. With several
views and analysis functions, MORTAR supports the interpretation of fragmentation results. In addition to three
currently integrated methods for fragmentation and substructure analysis -
<a href="https://github.com/zielesny/ErtlFunctionalGroupsFinder">ErtlFunctionalGroupsFinder</a>,
<a href="https://github.com/JonasSchaub/ErtlFunctionalGroupsFinder">ErtlFunctionalGroupsFinder</a>,
<a href="https://github.com/JonasSchaub/SugarRemoval">Sugar Removal Utility</a>,
and <a href="https://github.com/Julian-Z98/ScaffoldGenerator">Scaffold Generator</a> - MORTAR allows straightforward integration of
and <a href="https://github.com/cdk/cdk-scaffold">CDK-Scaffold</a> - MORTAR allows straightforward integration of
additional fragmentation algorithms with automatic generation of settings
menus. All cheminformatics functionalities are implemented based on the <a href="https://github.com/cdk/cdk">Chemistry Development Kit (CDK)</a>.<br>
The scientific article describing MORTAR can be found here:
Expand Down Expand Up @@ -116,14 +116,14 @@ into it (i.e. sub-folders of "AdoptOpenJDK\jdk-17.0.4_8_jre\" need to be "bin",
**Needs to be pre-installed:**
* Java Development Kit (JDK) version 17.0.4 or higher
* [Adoptium Open JDK](https://adoptium.net) (as one possible source of the JDK)
* Gradle version 7.3
* Gradle version 8.5
* [Gradle Build Tool](https://gradle.org)

**Managed by Gradle:**
* JavaFX version 17.0.2
* JavaFX version 21.0.1
* [Open JavaFX](https://openjfx.io)
* GNU General Public License (GPL) Version 2
* Chemistry Development Kit (CDK) version 2.8
* Chemistry Development Kit (CDK) version 2.9
* [Chemistry Development Kit on GitHub](https://cdk.github.io/)
* License: GNU Lesser General Public License 2.1
* JUnit version 5.9.3
Expand All @@ -132,7 +132,7 @@ into it (i.e. sub-folders of "AdoptOpenJDK\jdk-17.0.4_8_jre\" need to be "bin",
* LibrePDF OpenPDF version 1.3.26
* [OpenPDF GitHub repository](https://github.com/LibrePDF/OpenPDF)
* License: GNU Lesser General Public License 2.1
* Spotless version 6.19
* Spotless version 6.23
* [Spotless GitHub repository](https://github.com/diffplug/spotless)
* License: Apache-2.0 license

Expand Down Expand Up @@ -169,7 +169,7 @@ fragmentation (Baensch et al. 2023)).
* [Steinbeck C, Han Y, Kuhn S, Horlacher O, Luttmann E, Willighagen EL. The Chemistry Development Kit (CDK): An Open-Source Java Library for Chemo- and Bioinformatics. J Chem Inform Comput Sci. 2003;43(2):493-500.](https://dx.doi.org/10.1021%2Fci025584y)
* [Steinbeck C, Hoppe C, Kuhn S, Floris M, Guha R, Willighagen EL. Recent Developments of the Chemistry Development Kit (CDK) - An Open-Source Java Library for Chemo- and Bioinformatics. Curr Pharm Des. 2006; 12(17):2111-2120.](https://doi.org/10.2174/138161206777585274)
* [May JW and Steinbeck C. Efficient ring perception for the Chemistry Development Kit. J. Cheminform. 2014; 6:3.](https://dx.doi.org/10.1186%2F1758-2946-6-3)
* [Willighagen EL, Mayfield JW, Alvarsson J, Berg A, Carlsson L, Jeliazkova N, Kuhn S, Pluska T, Rojas-Chertó M, Spjuth O, Torrance G, Evelo CT, Guha R, Steinbeck C, The Chemistry Development Kit (CDK) v2.0: atom typing, depiction, molecular formulas, and substructure searching. J Cheminform. 2017; 9:33.](https://doi.org/10.1186/s13321-017-0220-4)
* [Willighagen EL, Mayfield JW, Alvarsson J, Berg A, Carlsson L, Jeliazkova N, Kuhn S, Pluskal T, Rojas-Chertó M, Spjuth O, Torrance G, Evelo CT, Guha R, Steinbeck C, The Chemistry Development Kit (CDK) v2.0: atom typing, depiction, molecular formulas, and substructure searching. J Cheminform. 2017; 9:33.](https://doi.org/10.1186/s13321-017-0220-4)
* [Groovy Cheminformatics with the Chemistry Development Kit](https://github.com/egonw/cdkbook)

## Acknowledgements
Expand Down
20 changes: 8 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import java.util.regex.Matcher

plugins {
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.13'
id 'com.diffplug.spotless' version '6.19.0'
id 'org.openjfx.javafxplugin' version '0.0.14'
id 'com.diffplug.spotless' version '6.23.3'
}

group 'de.unijena.cheminf'
version '1.1.1.0'

sourceCompatibility = 1.17
sourceCompatibility = 1.21

//Creates javadoc and sources jars
java {
Expand All @@ -21,8 +21,8 @@ repositories {
mavenCentral()
}

def javaFxVersion = '17.0.2'
def cdkVersion = '2.8'
def javaFxVersion = '21.0.1'
def cdkVersion = '2.9'

dependencies {
implementation 'org.jetbrains:annotations:19.0.0'
Expand All @@ -31,6 +31,7 @@ dependencies {
implementation group: 'org.openscience.cdk', name: 'cdk-bundle', version: cdkVersion
implementation group: 'org.openscience.cdk', name: 'cdk-scaffold', version: '2.8'
implementation group: 'io.github.jonasschaub', name: 'sru', version: '1.4.0.0'
implementation group: 'io.github.jonasschaub', name: 'ErtlFunctionalGroupsFinder', version: '1.2.0.0'
implementation group: 'com.github.librepdf', name: 'openpdf', version: '1.3.26'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
Expand Down Expand Up @@ -75,7 +76,7 @@ startScripts {
doLast {
windowsScript.text = windowsScript.text.replaceAll('set CLASSPATH=.*', 'set CLASSPATH=.;%APP_HOME%/lib/*')
windowsScript.text = windowsScript.text.replace("set JAVA_HOME=%JAVA_HOME:\"=%",
"set JAVA_HOME=%APP_HOME%\\jdk-17.0.4_8_jre\\")
"set JAVA_HOME=%APP_HOME%\\jdk-21.0.1_12_jre\\")
windowsScript.text = windowsScript.text.replaceAll("java.exe", "javaw.exe")
//windowsScript.text = windowsScript.text.replace("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%", "start \"MORTAR\" \"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%") //dirty workaround to suppress command window
//dirty workaround to suppress command window and pass CMD options to MORTAR to suppress the Java version check
Expand All @@ -96,7 +97,7 @@ task updateHeapSpace20GbExtraRunApp(type: CreateStartScripts) {
doLast {
windowsScript.text = windowsScript.text.replaceAll('set CLASSPATH=.*', 'set CLASSPATH=.;%APP_HOME%/lib/*')
windowsScript.text = windowsScript.text.replace("set JAVA_HOME=%JAVA_HOME:\"=%",
"set JAVA_HOME=%APP_HOME%\\jdk-17.0.4_8_jre\\")
"set JAVA_HOME=%APP_HOME%\\jdk-21.0.1_12_jre\\")
windowsScript.text = windowsScript.text.replaceAll("java.exe", "javaw.exe")
//windowsScript.text = windowsScript.text.replace("\"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%", "start \"MORTAR\" \"%JAVA_EXE%\" %DEFAULT_JVM_OPTS%") //dirty workaround to suppress command window
//dirty workaround to suppress command window and pass CMD options to MORTAR to suppress the Java version check
Expand Down Expand Up @@ -171,11 +172,6 @@ distributions {

spotless {
java {
target fileTree('.') {
include '**/*.java'
//exclude all classes that were just copied into this project
exclude '**/deglycosylation/**', '**/scaffoldGenerator/**', '**/cdk/**'
}
toggleOffOn() //all code in between spotless:off / spotless:on will be ignored
licenseHeaderFile('License-header/License-header.txt')
encoding 'UTF-8'
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@
public class PipelineSettingsViewController {

//<editor-fold desc="private final class variables" defaultstate="collapsed">
/**
* Name of the pipeline as configure in the dialog
*/
private final StringProperty pipelineName;
/**
* Stage of the MainView
Expand Down Expand Up @@ -360,7 +357,7 @@ private void reset(){
//
//<editor-fold desc="public properties" defaultstate="collapsed">
/**
* Returns StringProperty for the pipeline name
* Returns StringProperty for the pipeline name as configured in the dialog.
*
* @return StringProperty
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
* @version 1.0.0.0
*/
public final class GuiDefinitions {
//<editor-fold desc="Protected constructor">
/**
* Private parameter-less constructor.
* Introduced because javadoc build complained about classes without declared default constructor.
*/
private GuiDefinitions() {
}
//</editor-fold>

/**
* Value for the GUI insets
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/de/unijena/cheminf/mortar/gui/util/GuiUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ public class GuiUtil {
private static final Logger LOGGER = Logger.getLogger(GuiUtil.class.getName());
//</editor-fold>
//
//<editor-fold desc="Protected constructor">
/**
* Private parameter-less constructor.
* Introduced because javadoc build complained about classes without declared default constructor.
*/
private GuiUtil() {
}
//</editor-fold>
//
//<editor-fold desc="public static methods" defaultstate="collapsed">
/**
* Creates and shows an alert with arbitrary alert type.
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/de/unijena/cheminf/mortar/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@
* @version 1.0.0.0
*/
public class Main {
//<editor-fold desc="Protected constructor">
/**
* Private parameter-less constructor.
* Introduced because javadoc build complained about classes without declared default constructor.
*/
private Main() {
}
//</editor-fold>

/**
* Main method to start the application
*
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/de/unijena/cheminf/mortar/main/MainApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ public class MainApp extends Application {
*/
public static final String SKIP_JAVA_VERSION_CHECK_CMD_ARG_NAME = "-skipJavaVersionCheck";
//
/**
* Parameter-less constructor that calls super().
* Introduced because javadoc build complained about classes without declared default constructor.
*/
public MainApp() {
super();
}
//
/**
* Calls start(Stage) of Application class.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ public class MoleculeDataModel {
*/
private String uniqueSmiles;
//
/**
* Property whether the molecule is selected or not.
*/
private BooleanProperty selection;
//
/**
Expand Down Expand Up @@ -116,8 +113,10 @@ public MoleculeDataModel(String aUniqueSmiles, String aName, Map<Object, Object>
this.properties = aPropertyMap;
this.uniqueSmiles = aUniqueSmiles;
this.selection = new SimpleBooleanProperty(true);
this.fragments = new HashMap<>(BasicDefinitions.DEFAULT_INITIAL_MAP_CAPACITY);
this.fragmentFrequencies = new HashMap<>(BasicDefinitions.DEFAULT_INITIAL_MAP_CAPACITY);
this.fragments = new HashMap<>(BasicDefinitions.DEFAULT_INITIAL_MAP_CAPACITY,
BasicDefinitions.DEFAULT_HASH_COLLECTION_LOAD_FACTOR);
this.fragmentFrequencies = new HashMap<>(BasicDefinitions.DEFAULT_INITIAL_MAP_CAPACITY,
BasicDefinitions.DEFAULT_HASH_COLLECTION_LOAD_FACTOR);
}
//
/**
Expand Down Expand Up @@ -192,7 +191,7 @@ public boolean isSelected(){
* @return BooleanProperty
*/
public BooleanProperty selectionProperty(){
return selection;
return this.selection;
}
//
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,22 @@
* @version 1.0.0.0
*/
public class DepictionUtil {

//<editor-fold desc="private static final class variables" defaultstate="collapsed">
/**
* Logger of this class.
*/
private static final Logger LOGGER = Logger.getLogger(DepictionUtil.class.getName());
//</editor-fold>
//
//<editor-fold desc="Protected constructor">
/**
* Private parameter-less constructor.
* Introduced because javadoc build complained about classes without declared default constructor.
*/
private DepictionUtil() {
}
//</editor-fold>
//
//<editor-fold desc="public static methods" defaultstate="collapsed">
/**
* Creates and returns an Image of the given AtomContainer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,34 +291,21 @@ public static enum CycleFinderOption {
//</editor-fold>
//
//<editor-fold desc="Private final variables">
/**
* A property that has a constant name from the FGEnvOption enum as value.
*/
//note: since Java 21, the javadoc build complains about "double comments" when there is a comment
// for the get method of the property and the private property itself as well
private final SimpleEnumConstantNameProperty environmentModeSetting;

/**
* A property that has a constant name from the ElectronDonationModelOption enum as value.
*/
private final SimpleEnumConstantNameProperty electronDonationModelSetting;

/**
* A property that has a constant name from the IMoleculeFragmenter.FragmentSaturationOption enum as value.
*/
private final SimpleEnumConstantNameProperty fragmentSaturationSetting;

/**
* A property that has a constant name from the EFGFFragmenterReturnedFragmentsOption enum as value.
*/
private final SimpleEnumConstantNameProperty returnedFragmentsSetting;

/**
* A property that has a constant name from the CycleFinderOption enum as value.
*/
private final SimpleEnumConstantNameProperty cycleFinderSetting;

/**
* A property that has a boolean as value saying whether single-atom molecules should be filtered from inputs.
*/
private final SimpleBooleanProperty filterSingleAtomsSetting;

/**
Expand Down
Loading

0 comments on commit 97f5afa

Please sign in to comment.