❯ Knot is a Java library and data structure designed to model, save data and visualize complex structures, such as knots, molecules and helical structures. Inspired by knot theory, this library allows you to graphically represent links between nodes with specific crossings, which is ideal for visually exploring patterns and connections in two-dimensional graphs.
Built with the tools and technologies:
Table of Contents
Knot is a Java library developed for creating and exploring graph-based structures such as knots, molecular bonds, and helical formations. This library utilizes KnotNode
and KnotEdge
classes to represent nodes and edges with customizable crossing types (e.g., over and under crossings), enabling users to construct both simple and complex structures like DNA helices or molecular models.
- Graph Representation: Model nodes and edges with customizable crossing types.
- Library of Knots: Pre-built knots such as the Trefoil Knot, Figure-Eight Knot, and Clove Hitch.
- Molecular Modeling: Represent molecules with covalent bonds and 3D-like node spacing.
- Helical Structures: Create DNA-like double helices with paired nucleotide nodes.
- Visualization Capabilities: Easily visualize complex knot patterns and molecule-like structures.
└── Knot/
├── LICENSE
├── pom.xml
└── src
└── main
└── java
└── knot
├── KnotEdge.java
├── KnotGraph.java
├── KnotLibrary.java
├── KnotNode.java
└── KnotVisualizer.java
KNOT/
__root__
src
main
java
knot
KnotVisualizer.java ❯ REPLACE-ME
KnotGraph.java ❯ REPLACE-ME
KnotLibrary.java ❯ REPLACE-ME
KnotEdge.java ❯ REPLACE-ME
KnotNode.java ❯ REPLACE-ME
Before getting started with Knot, ensure your runtime environment meets the following requirements:
- Programming Language: Java
Add the repository and dependency in your pom.xml
file:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.iamjuaness</groupId>
<artifactId>knot</artifactId>
<version>0.0.1</version>
</dependency>
Add JitPack in the build.gradle
file and then the dependency:
repositories {
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.iamjuaness:knot:0.0.1'
}
This example shows how to create a Trefoil Knot and visualize it using the KnotVisualizer
class:
import knot.KnotGraph;
import knot.KnotLibrary;
import knot.KnotVisualizer;
public class KnotExample {
public static void main(String[] args) {
// Create the eight knot graph
KnotGraph eightKnot= KnotLibrary.createFigureEightKnot();
// Visualize the knot in a graphical window.
KnotVisualizer.visualizeKnot(eightKnot);
}
}
-
Task 1
:Implement basic Knot and molecular structures. -
Task 2
: Expand visualization capabilities (3D support). -
Task 3
: Add further molecular structures (e.g., amino acids, protein backbones).
- 💬 Join the Discussions: Share your insights, provide feedback, or ask questions.
- 🐛 Report Issues: Submit bugs found or log feature requests for the
Knot
project. - 💡 Submit Pull Requests: Review open PRs, and submit your own PRs.
Contributing Guidelines
- Fork the Repository: Start by forking the project repository to your github account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/iamjuaness/Knot
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to github: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
This project is protected under the Mit License License. For more details, refer to the LICENSE file.
- Special thanks to resources in knot theory and molecular biology that inspired the creation of this library.