Skip to content

nkinney06/crossingComplexity

Repository files navigation

supplementary codes for the paper,
"Crossing Complexity of Space-Filling Curves Reveals Entanglement of S-Phase DNA"

contact nkinney06 [at] gmail.com for questions.
better documentation of these codes is a work in progress, check back for updates


QUICK START (I recommend trying the exercises in order)


FIRST COMPILE the C codes and make some test directions:
	gcc -Wall -Werror -O3 S1code.c -o multiHamiltonian
	gcc -Wall -Werror -O3 -fopenmp S2code.c -o crossingComplexity -lm
	gcc -O3 chulls.c -o calcTerritories -lm
	python dir.py 1000


exercise 1: generate and visualize some structires (NOTE the 4th command nests 3x3x3 paths and takes about 5 minutes)
	./multiHamiltonian --numberPaths 2 --initialSize 16 | python vtf.py > equilibrium.vtf
	./multiHamiltonian --numberPaths 2 --initialSize 8 --cycles 2 | python vtf.py > intermediate.vtf
	./multiHamiltonian --numberPaths 2 --initialSize 4 --cycles 2,2 | python vtf.py > Hilbert.vtf
	./multiHamiltonian --msd 10 --numberPaths 4 --initialSize 4 --cycles 3,2 | python vtf.py > largeExample.vtf
	./multiHamiltonian --msd 0 --numberPaths 3 --initialSize 3 --cycles 2,2,2 | python vtf.py > anotherExample.vtf
	use VMD to to open the vtf files https://www.ks.uiuc.edu/Research/vmd/


exercise 2: generate a structures and compute crossing complexity
	./multiHamiltonian --numberPaths 2 --initialSize 16 | python txt.py
	./crossingComplexity vectors.txt curve_1.txt curve_2.txt > crossingComplexity.txt


exercise 3: generate figures
	python simpleHeatmap.py crossingComplexity.txt
	python cubizeHeatmap.py crossingComplexity.txt
	python vectorHeatmap.py crossingComplexity.txt
	python sphereHeatmap.py crossingComplexity.txt


exercise 4: generate an ensemble of 10 stuctures and place each snapshot in a seperate directory
	for i in {1..10}; 
	do mkdir snapshot_$i; 
	./multiHamiltonian --numberPaths 2 --initialSize 16 > snapshot.txt; 
	cat snapshot.txt | python txt.py; 
	cat snapshot.txt | python vtf.py > snapshot.vtf; 
	./crossingComplexity vectors.txt curve_1.txt curve_2.txt > crossingComplexity.txt; 
	mv snapshot.txt curve* snapshot.vtf crossingComplexity.txt snapshot_$i/; 
	done


exercise 5: run analysis of an entire ensemble (extension of exercise 4)
	mkdir equilibrium
	mv snapshot_* equilibrium/
	python densityAnalysis.py equilibrium
	python ergodicAnalysis.py equilibrium
	python knotDeterminant.py equilibrium 1>/dev/null 2>/dev/null
	python GaussLinkNumber.py equilibrium > linkingNumbers.txt


exercise 6: generate xyz data for KnotGenom
	./multiHamiltonian --numberPaths 3 --initialSize 3 | python xyz.py > structure.xyz
	upload structure.xyz to https://knotgenom.cent.uw.edu.pl/


exercise 7: generate a structure and preform analysis of territories
	./multiHamiltonian --numberPaths 2 --initialSize 16 > snapshot.txt
	cat snapshot.txt | python int.py
	./calcTerritories curve_1.txt curve_2.txt > territories.txt
	cat snapshot.txt | python vtf.py > system.vtf
	python tcl.py ( requires command line vmd and tacyon ray tracer )
	



NOTES ON EXERCISE 7 (INSTALLING VMD AND TACHYON tested on 8/18/2020)
-----------------------------------------------------------------------------------------------------------------------------------
command line version of VMD can be obtained here (see LINUX_64 Text-mode (Linux (RHEL 6.7 and later) 64-bit Intel/AMD x86_64 w/ SSE, Text-mode))
	https://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD
	tar xvf vmd-1.9.3.bin.LINUXAMD64.text.tar.gz
	(actually I recommend vmd-1.9.2)

create a directory for vmd to live with the following directory structure,	     
	vmd
	├ bin
	└ lib
 
update the configure file according to the VMD install instructions
	$install_bin_dir="/home/nick/vmd/bin";
	$install_library_dir="/home/nick/vmd/lib";
	./configure
	cd src/
	make install

add VMD to your path:
	export PATH="/home/nick/vmd/bin:$PATH"
	source .bashrc
	
get the current tachyon distribution: (I highly recommend Version 0.99)
	http://jedi.ks.uiuc.edu/~johns/raytracer/files/0.98.9/
	tar xvf tachyon-0.98.9.tar.gz
	cd tachyon/unix
	make linux-64

add Tachyon to your path
	export PATH="/home/nick/tachyon/compile/linux-64:$PATH"
	source .bashrc



outline of a script to preform all analysis for a sample of curves
-----------------------------------------------------------------------------------------------------------------------------------
for i in {1..2}; 
do mkdir snapshot_$i; 
./multiHamiltonian --numberPaths 2 --initialSize 16 > snapshot.txt; 
cat snapshot.txt | python vtf.py > snapshot.vtf; 
cat snapshot.txt | python txt.py; 
./crossingComplexity vectors.txt curve_1.txt curve_2.txt > crossingComplexity.txt; 
cat snapshot.txt | python int.py
./calcTerritories curve_1.txt curve_2.txt > territories.txt
python tcl.py
python simpleHeatmap.py crossingComplexity.txt
python cubizeHeatmap.py crossingComplexity.txt
python vectorHeatmap.py crossingComplexity.txt
python sphereHeatmap.py crossingComplexity.txt
mv *.png *.tcl *.dat territories.txt *.bmp snapshot.txt curve* snapshot.vtf crossingComplexity.txt snapshot_$i/; 
done


outline of a script to preform knots and linking analysis for a sample of curves
-----------------------------------------------------------------------------------------------------------------------------------
for i in {1..100};
do mkdir snapshot_$i;
./multiHamiltonian --numberPaths 3 --initialSize 9 > snapshot.txt;
cat snapshot.txt | python txt.py;
cat snapshot.txt | python xyz.py > structure.xyz
mv snapshot.txt curve* structure.xyz snapshot_$i/;
done

mkdir ensemble
mv snapshot_* ensemble/
python knotDeterminant.py ensemble 1>/dev/null 2>/dev/null
python GaussLinkNumber.py ensemble > linkingNumbers.txt




About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors