Skip to content
christopher dedman rollet

Research tool

Macromolecule Coarse-Graining Tool

Documentation, requirements, and file formats for the coarse-graining tool, plus the download.

Language
Java (JDK 11+)
Build
GNU Make
Entry point
src.CGPartitioning
Origin
RSCA research grant

Overview

The project is a Java application built from several classes: CGPartitioning, Octree, OctreeCoordinateItem, OctreeDataItem, and PointWithCharge. A Makefile wraps compiling, running, and cleaning.

Requirements

Usage

From the root directory you can compile and run with plain Java. First compile:

mkdir -p build
javac -d build src/*.java

Then run with two input files and one output file, in this order: points with charge first, control points second, output filename last.

java -cp build src.CGPartitioning pointsWithCharge1MYK.txt controlPoints1MYK.txt irrParts_Output.txt

Make targets

  • make compile — compile all Java files into /build.
  • make run ARGS='charges controls output' — run /build/src/CGPartitioning against those files.
  • make clean — remove /build and everything compiled into it.
  • make help — list every available target.

Input formats

Two input text files are required, passed as command-line arguments: the point charge file first, the control point file second.

1. Point charge file

Coordinates paired with charge values. Each entry is wrapped in double curly braces, where the first part is the coordinate (X, Y, Z) and the second is the charge. One entry per line.

{{X1, Y1, Z1}, Charge1}
{{X2, Y2, Z2}, Charge2}
{{X3, Y3, Z3}, Charge3}

For example:

{{39.266, 59.555, 46.185}, -0.3}
{{38.125, 60.364, 46.626}, 0.21}
{{36.859, 59.512, 46.734}, 0.51}
{{36.625, 58.613, 45.922}, -0.51}

2. Control point file

A list of coordinates, each in single curly braces, each three floating-point numbers. One per line.

{X1, Y1, Z1}
{X2, Y2, Z2}
{X3, Y3, Z3}

For example:

{9.455, 47.808, 48.53}
{10.554, 47.771, 47.575}
{9.704, 47.365, 48.096}

Output format

Results are written to the file given as the third argument. Each line is an array containing a 2D array of three floating-point coordinates paired with charge values; the last two elements of the outer array are the control point index and the Euclidean distance.

{{{{X1, Y1, Z1}, Charge1}, {{Xn, Yn, Zn}, Chargen}}, index, distance}

For example:

{{{{36.625, 58.613, 45.922}, -0.51}, {{38.125, 60.364, 46.626}, 0.21}}, 9716, 2.8898307908941634}
{{{{37.892, 61.564, 45.668}, -0.18}, {{39.075, 62.511, 45.568}, -0.18}}, 11715, 1.999496936731834}
{{{{38.332, 60.749, 47.532}, 0.1}}, 11362, 1.0337030521382882}