# TO COMPILE

  make

should compile the program bi_sym_cages  and equigraphs_bi_12_snapshot

###############################################################
# bi_sym_cages  USAGE
###############################################################

Example:
bi_sym_cages -type Ato -P1 9 -P2 11 -q1 1 -q2 3 -q3 2 -Q1 3 -Q2 1 -Q3 4 -ts 1.1 -S1 1.35 -S2 1.35  -cc 500 -cpc 500 -T0 4e-3 -Tmin 1e-8 -track 500 -n_sweep 1000 -nr 10 -ncla 100 -dx_min 1e-13 -use_grad_mc -cla_mc -pure_mc

Find p-cages for 200 values of cl and ca such that  c_l+c_a =2
-type TYPE : the type of solid as listed below
-P1 9 : use nanogons
-P2 11 : and hendecagons 
-qi : the value of each qi for the nanogons
-Qi : the value of each qi for the hendecagons
-cc 500 : Face convexity weight for the face. Keep as is
-cc 500 : p-cage convexity weight for the face. Keep as is
-T0 0.004 : Initial MC temperature. Can require tweaking
-Tmin 1e-8 : Minimum MC temperature.
-track 500 :  MC parameter.
-n_sweep 1000 : MC parameter. Keep or increase
-nr 10 : preform 10 full relaxation and keep next value.
-ncla 100 : number of ca  values between 1 and 0.001 and then cl between 1
            and 0.001. SO 200 values in total.
-dx_min 1e-13 : leave as is
-use_grad_mc : use gradient MC
-cla_mc  : relax each value of cl, ca using MC
-pure_mc : use pure MC

SOLID               TYPE  
Square Prism (cube)      sp   
Truncated octahedron     Ato
Truncated cuboctahedron  Atco
Icosidodecahedron        Atid
Rhombic dodecahedron    DArd
Rhombic triacontahedron  DArt

The program generates text files with the coordinates of the data.

###############################################################
# equigraphs_bi_12_snapshot  USAGE
###############################################################
Generates a list of all potential graphs with two types of vertices
such that all the vertices of a given type are equivalent to each other
via an automorphism of the graph and such that vertices of a given type
are only connected to vertices of the other type.

Parameters:
 P : The maximum size for the faces of the graph
 L1 : the valence of the 1st type of vertices
 L2 : the valence of the 2nd type of vertices
 Fmax : the maximum number of  face in the graph.
 napshot_interval : intervals between snapshots
 restore : use the specified snapshot file to resume the computation.

The output file contains one possible graph per line. Each line is made
out of 5 groups separated by ";" and a last one after a "#".
1: L1 L2

2: Coma separated list of "N n1 n2", graph containing N faces with n1 vertices
of type 1 and n2 vertices of type 2.

3: Coma separated list of "N n" each vertex of type 1 belongs to N faces of type
  n as listed in the 2nd group (n starts from 0)
4: Same as 3 but for vertices of type 2.

5: N1 N2 : N1 vertices of type 1 and N2 vertices of type 2 

6 : The number after the # is the total number of faces in the graph.

Example :
equigraphs_bi_12_snapshot  -P 10 -L1 3 -L2 4 -Fmax 100
equigraphs_bi_12_snapshot  -P 10 -L1 3 -L2 4 -Fmax 100

###############################################################
# PYTHON FILES
###############################################################
The folder  python  contains 2 python programs:

###############################################################
# GENERATING off FILES : p_cage_off.py
###############################################################
The program p_cage_off.py to converts the coordinates file generated by
bi_sym_cages to an off file:

  bi_p_cage_off.py FILE.txt

The "off" files can be viewed with  antiview or geomview 

###############################################################
# GENERATING ALL THE CAGES: mk_all_cages.py
###############################################################
One can generate all the potential p-cages of a given type and P-gone
using the python program

    mk_all_cages.py

The syntax is

    mk_all_cages.py -P1=p -P2=p -t=TYPE -qmax=5 -dqmax=5

where p is the number of edges for each polygon
      t is sp Ato Atco Atid DArd or DArt  as in the table above.
      -qmax is the largest value for the qs.
      -dqmax is the largest value difference between the qs.

The program creates a directory for each p-cage as well as a shell file named
"run.csh", in that directory, with the parameters set for that p-cage.
The relaxation parameters sometimes have to be tweaked for some p-cages.
The shell file "run.csh" can be used to executes bi_sym_cages with the
selected parameters.


Example
  All square prism p-cages with octagonal and nonagonal faces
      mk_all_cages.py -P1=8 -P2=9 -t=sp -qmax=5 -dqmax=5
      
  All truncated octagonal p-cages with hexagonal and decagonal faces
      mk_all_cages.py -P1=6 -P2=10 -t=Ato -qmax=5 -dqmax=5

  All truncated cuboctahedron p-cages with decagonal and ddoecagonal faces
      mk_all_cages.py -P1=10 -P2=11 -t=Atco -qmax=5 -dqmax=5

  All icosidodecagonal p-cages with nonagonal and hendecagonal faces
      mk_all_cages.py -P1=9 -P2=11 -t=Atid -qmax=5 -dqmax=5

