Polymer Graph Sketcher

Create 2D sketches of Polymers: With this software, you can sketch bead-spring networks in 2D.

Example: Illustration of a bead-spring model created with this software

Contents

Usage

This app is published here: polymer-graph-sketcher.

It is free to use, but you are asked to cite this repository when you publish images generated with it.

Interface Overview

The Polymer Graph Sketcher interface consists of a canvas where you draw your polymer graphs, and a control panel with various settings and tools.

Note that you can only select vertices/nodes, and not edges. Edges are selected by the two connected vertices/nodes.

Drawing Modes

You can switch between different drawing modes using the dropdown menu or keyboard shortcuts:

Settings

Edge Settings

These settings affect both new as well as edges between the currently selected nodes.

Vertex Settings

These settings affect both new as well as currently selected nodes/vertices.

Canvas Settings

Generators

Random Walk Generator

Side Chain Generator

Tools

[!WARNING]
Many of these tools are non-reversible, as implemented currently. Be sure to export your graph beforehand to have a backup.

Export Options

These tools and settings allow for the creation of complex polymer graphs, from simple linear chains to branched structures with side chains. The various export options ensure that your work can be saved and used in different formats as needed.

The import of the JSON file is offered at the bottom of the tools.

Keyboard Shortcuts

The Polymer Graph Sketcher supports the following keyboard shortcuts for quick access to various functions:

General Actions

Interaction Modes

These shortcuts provide quick access to common actions and interaction modes, enhancing the efficiency of working with the Polymer Graph Sketcher.

Development

Steps to code:

  1. Clone this repository, e.g. with git clone git@github.com:GenieTim/polymer-graph-sketcher.git,
  2. Switch the folder to this repository, e.g. with cd polymer-graph-sketcher
  3. Install the dependencies, e.g. with npm install
  4. Build and run, e.g. with npm run dev

Acknowledgement

This development of this code was done for projects supported by the Swiss National Science Foundation (SNSF project 200021_204196).