Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d34682f
sets up production branch and Gradle build with multiple Java versions
JonasSchaub Feb 24, 2025
679dc36
only build against Java 17 again
JonasSchaub Feb 24, 2025
a7882fb
added float array methods and float matrix generation;
Mila1004 May 16, 2025
8e84031
minor additions;
Mila1004 Oct 23, 2025
18fc9c4
Code improvements;
Mila1004 Oct 24, 2025
d64b367
WIP on float matrix generation;
Mila1004 Oct 28, 2025
4d40fc5
WIP on float matrix generation;
Mila1004 Oct 29, 2025
c2da6ef
WIP on float matrix generation;
Mila1004 Oct 30, 2025
c67e437
WIP on float matrix generation;
Mila1004 Nov 3, 2025
fd75d58
added support for Float matrix instead of Integer matrix;
Mila1004 Nov 4, 2025
27cfac3
removed deprecated methods;
Mila1004 Nov 5, 2025
9301105
mainly code quality improvements;
Mila1004 Nov 5, 2025
47e25b8
further code quality improvements;
Mila1004 Nov 6, 2025
959f16f
minor code quality changes;
Mila1004 Nov 10, 2025
aa2d160
WIP! removal of class variable dependencies;
Mila1004 Nov 12, 2025
f6fb8bc
WIP! removal of class variable dependencies;
Mila1004 Nov 14, 2025
fd6fd82
finished code cleanup of FragmentFingerprinter class;
Mila1004 Nov 18, 2025
aa985e6
changes according to code review;
Mila1004 Nov 19, 2025
654594e
changes according to code review;
Mila1004 Nov 20, 2025
afb12db
chore: updates SonarCloud / SonarQube workflow
JonasSchaub Nov 21, 2025
c17f4e5
chore: adds more Java versions to build action
JonasSchaub Nov 21, 2025
d2a5f79
chore: updates gradle and junit
JonasSchaub Nov 21, 2025
49a04ef
Merge pull request #10 from JonasSchaub/sonarqube_update
JonasSchaub Nov 21, 2025
e8cb0df
code simplifications and quality improvements;
Mila1004 Nov 24, 2025
95695ec
final code review changes;
Mila1004 Nov 25, 2025
3261edc
javadoc corrections;
Mila1004 Nov 26, 2025
5f5549e
changes to bit methods;
Mila1004 Nov 27, 2025
ccd3a1e
removed CountFingerprint internal SMILES String array;
Mila1004 Nov 27, 2025
3904d0c
changes to CountFingerprint and its tests; minor changes to FragmentF…
Mila1004 Nov 28, 2025
c70c26b
reworked mergeCountFingerprint(); smaller overall changes to CountFin…
Mila1004 Dec 2, 2025
bbe1cfb
changes to mergeCountFingerprint();
Mila1004 Dec 3, 2025
38adc38
changes to internal variable and method signatures;
Mila1004 Dec 3, 2025
624f472
small readability improvement;
Mila1004 Dec 3, 2025
678919d
removed general example usage; added float matrix example usage;
Mila1004 Dec 4, 2025
7107fe4
added array check to count routine;
Mila1004 Dec 8, 2025
a9d3c08
WIP! added generalized float fingerprint, and map dependent matrix ge…
Mila1004 Dec 16, 2025
fcd5afb
switched to map dependent matrix generation, and simplified method ca…
Mila1004 Dec 17, 2025
17ecdc0
Merge pull request #9 from JonasSchaub/dev-max
JonasSchaub Dec 18, 2025
d76475a
general housekeeping; updates artifact publishing to push to Maven Ce…
JonasSchaub Dec 18, 2025
2b2ba99
remove extra period in version string
JonasSchaub Dec 18, 2025
4c843ed
update actions
JonasSchaub Dec 18, 2025
63fcb9f
Merge pull request #11 from JonasSchaub/housekeeping
JonasSchaub Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
# source: SonarCloud setup tutorial

name: SonarCloud
name: SonarQube
on:
push:
branches:
- main
- production
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin' # Alternative distribution options are available, e.g. zulu
- name: Cache SonarCloud packages
uses: actions/cache@v3
- name: Cache SonarQube packages
uses: actions/cache@v4
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Cache Gradle packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
Expand Down
33 changes: 19 additions & 14 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ name: Java CI with Gradle

on:
push:
branches: [ "main" ]
branches: [ "main", "production" ]
pull_request:
branches: [ "main" ]
branches: [ "main", "production" ]

permissions:
contents: read
Expand All @@ -20,17 +20,22 @@ jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21, 25 ]
name: Java ${{ matrix.java }}

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
with:
arguments: build
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
- name: Build with Gradle
run: ./gradlew build
6 changes: 4 additions & 2 deletions .github/workflows/publish-javadoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write # if you have a protection rule on your repository, you'll need to give write permission to the workflow.
steps:
- name: Deploy JavaDoc 🚀
uses: MathieuSoysal/Javadoc-publisher.yml@v2.4.0
uses: MathieuSoysal/Javadoc-publisher.yml@v3.0.2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
javadoc-branch: javadoc
java-version: 17
target-folder: javadoc/1.1
target-folder: javadoc/1.2.0
project: gradle
26 changes: 8 additions & 18 deletions .github/workflows/publish-to-maven-central.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

#taken from: https://docs.github.com/en/actions/publishing-packages/publishing-java-packages-with-gradle
# and extended using https://selectfrom.dev/using-github-actions-to-automatically-publish-gradle-build-artifacts-d71c915cfa4
name: Publish package to the Maven Central Repository
on:
#push:
Expand All @@ -19,28 +17,20 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3
#- name: Publish package
#uses: gradle/gradle-build-action@749f47bda3e44aa060e82d7b3ef7e40d953bd629 #from the tutorial
##uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 #this is the action used in the other yml file, the Gradle build
#with:
#arguments: publish
#env:
#MAVEN_USERNAME: ${{ secrets.OSSRHUSERNAME }}
#MAVEN_PASSWORD: ${{ secrets.OSSRHPASSWORD }}
- name: Publish with Gradle #from the second tutorial
- name: Publish with Gradle
env:
MAVEN_PASSWORD: ${{secrets.OSSRHPASSWORD}}
MAVEN_USERNAME: ${{secrets.OSSRHUSERNAME}}
signingKey: ${{secrets.PGP_SECRET}}
signingPassword: ${{secrets.PGP_PASSPHRASE}}
run: ./gradlew publish --no-daemon
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{secrets.OSSRHPASSWORD}}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{secrets.OSSRHUSERNAME}}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{secrets.PGP_SECRET}}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{secrets.PGP_PASSPHRASE}}
run: ./gradlew publishToMavenCentral
7 changes: 5 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
cff-version: 1.2.0
title: FragmentFingerprinter
version: 1.1.0.0
version: 1.2.0
message: "If you use this software, please cite it as below."
type: software
authors:
- family-names: "Sevindik"
given-names: "Betuel"
orcid: "https://orcid.org/0000-0002-9448-8603"
- family-names: "Rottmann"
given-names: "Maximilian"
orcid: "https://orcid.org/0009-0006-6367-9788"
- family-names: "Baensch"
given-names: "Felix"
orcid: "https://orcid.org/0000-0001-8973-8463"
Expand All @@ -20,6 +23,6 @@ authors:
given-names: "Achim"
orcid: "https://orcid.org/0000-0003-0722-4229"
doi: "10.5281/zenodo.7998215"
date-released: 2023-10-27
date-released: 2025-12-18
url: "https://github.com/JonasSchaub/FragmentFingerprints"
license: MIT
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License

Copyright (c) 2023 Betuel Sevindik, Felix Baensch, Jonas Schaub, Christoph Steinbeck, and Achim Zielesny
Copyright (c) 2025 Betuel Sevindik, Maximilian Rottmann, Felix Baensch, Jonas
Schaub, Christoph Steinbeck, and Achim Zielesny

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion License-header/License-header.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
* MIT License
*
* Copyright (c) $today.year Betuel Sevindik, Felix Baensch, Jonas Schaub, Christoph Steinbeck, and Achim Zielesny
* Copyright (c) 2025 Betuel Sevindik, Maximilian Rottmann, Felix Baensch, Jonas
* Schaub, Christoph Steinbeck, and Achim Zielesny
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PERFORMANCE TEST CMD APPLICATION
---------------------------------
The folder "PerformanceTestCMDApplication"
contains the executable JAVA archive FragmentFingerprints-fat-1.1.0.0.jar.
contains the executable JAVA archive FragmentFingerprints-fat-1.2.0.jar.
It can be executed from the command line (command: java -jar) to do a performance snapshot of fragment fingerprinter's scaling behaviour for
a growing number of input molecules. It requires four command line arguments:

Expand All @@ -17,7 +17,7 @@ a growing number of input molecules. It requires four command line arguments:
if only a filename or a blank path is specified, the result folder is created in the same directory as the Jar.
* integer number (bin size). I.e. how many molecules are to be processed (in addition) per iteration.

Example usage: java -jar FragmentFingerprints-fat-1.1.0.0.jar Fragments_File_PerformanceTest_13000.csv MoleculeFragments_File_PerformanceTest_13000.csv " " 1000
Example usage: java -jar FragmentFingerprints-fat-1.2.0.jar Fragments_File_PerformanceTest_13000.csv MoleculeFragments_File_PerformanceTest_13000.csv " " 1000

The CMD application will then import the data sets and create bit and count fingerprints. The application will also create output files of the
measured runtimes and a file in which the generated fingerprints are stored line by line. So that each line
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.github.jonasschaub/FragmentFingerprints/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.github.jonasschaub/FragmentFingerprints)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=JonasSchaub_FragmentFingerprints&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=JonasSchaub_FragmentFingerprints)
# FragmentFingerprints
A library to generate fingerprints for molecular structures based on a set of fragments
A library to generate fingerprints for molecular structures based on a set of fragments represented as SMILES strings.

## Description
The library generates fragment fingerprints based on pre-defined fragments,
which can be set by the user, and can generate both bit and count fingerprints.
which can be set by the user. It can generate both bit and count fingerprints.
Fragment fingerprints are created by matching fragments or substructures of a
molecule with pre-defined fragments. If a match is found, the corresponding positions
in the fingerprint are filled. The special feature of the fragment fingerprinter is that fingerprints
molecule with pre-defined fragments. If a match is found, the corresponding position
in the fingerprint is set to true. The special feature of the fragment fingerprinter is that fingerprints
are generated exclusively by comparing unique SMILES (Strings). This means that both the pre-defined fragments and
the substructures or fragments of the molecule for which the fingerprint is
being generated must be represented as unique SMILES strings. The implementation of the fragment fingerprinter is based on
the Chemistry Development Kit (CDK).
the Chemistry Development Kit (CDK), i.e. it implements CDK interfaces for compatibility.

## Contents of this repository
### Sources
Expand All @@ -29,14 +29,14 @@ all source code packages including JUnit tests.

### Tests
The test class <i>FragmentFingerprinterTest</i> tests the functionalities of fragment fingerprinter.
Among other things, it tests whether the bit and count fingerprint of a molecule has been generated
Among other things, it tests whether the bit and count fingerprint of a molecule have been generated
correctly. Furthermore, various methods of the CountFingerprint and
BitSetFingerprint classes are tested.

### Test resources
The test <a href="https://github.com/JonasSchaub/FragmentFingerprints/tree/FragmentFingerprint/src/test/resources/de/unijena/cheminf/fragment/fingerprint">"resources"</a> subfolder
contains two text files. The text file named "FragmentList.txt" contains all key fragments. And the file
named "MoleculeList.txt" contains fragments/substructures of molecules.
named "MoleculeFragments.txt" contains fragments/substructures of molecules.
In total, 10 molecules with their corresponding fragments are stored in the file.

### Performance Test CMD Application
Expand Down Expand Up @@ -67,14 +67,14 @@ be pre-installed.
**Needs to be pre-installed:**
* Java Development Kit (JDK) version 17
* [Adoptium OpenJDK](https://adoptium.net) (as one possible source of the JDK)
* Gradle version 7.3
* Gradle version 9.2.0
* [Gradle Build Tool](https://gradle.org)

**Managed by Gradle:**
* Chemistry Development Kit (CDK) version 2.9
* Chemistry Development Kit (CDK) version 2.11
* [Chemistry Development Kit on GitHub](https://cdk.github.io/)
* License: GNU Lesser General Public License 2.1
* JUnit Jupiter version 5.9.1
* JUnit Jupiter version 6.0.1
* [JUnit ](https://junit.org/junit5/)
* License: Eclipse Public License - v 2.0

Expand Down
Loading