Skip to content

Knot is a Java library designed to model 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.

License

Notifications You must be signed in to change notification settings

iamjuaness/Knot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

KNOT

❯ 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.

license last-commit repo-top-language repo-language-count repo-jar

Built with the tools and technologies:

java


Table of Contents

📍 Overview

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.


👾 Features

  • 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.

📁 Project Structure

└── Knot/
    ├── LICENSE
    ├── pom.xml
    └── src
        └── main
            └── java
                └── knot
                    ├── KnotEdge.java
                    ├── KnotGraph.java
                    ├── KnotLibrary.java
                    ├── KnotNode.java
                    └── KnotVisualizer.java

📂 Project Index

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

🚀 Getting Started

☑️ Prerequisites

Before getting started with Knot, ensure your runtime environment meets the following requirements:

  • Programming Language: Java

⚙️ Installation

With Maven

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>

With Gradle

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'
}

🤖 Usage

1. Creating and visualizing a simple knot

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);
    }
}

📌 Project Roadmap

  • 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).

🔰 Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/iamjuaness/Knot
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


🎗 License

This project is protected under the Mit License License. For more details, refer to the LICENSE file.


🙌 Acknowledgments

  • Special thanks to resources in knot theory and molecular biology that inspired the creation of this library.

About

Knot is a Java library designed to model 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.

Topics

Resources

License

Stars

Watchers

Forks

Languages