/* This is a program for implementing a site-bond percolation model that I developed. Instead of assigning a fixed bonding arrangement with a fixed coordination number, this model allows for random bond assignment with a fixed coordination number within a cubic lattice. It also allows for the attachment of multiple molecules at a single bond. The program executes without any command line inputs, and queries for relevant information. It outputs some data to the screen and all data to datafile. Author: Riyad Chetram Raghu Date:November 15, 2001 */ // Copyright (c) 2002-2003 Riyad Chetram Raghu // Version 1.0 of January 13, 2003. #include #include #include #include #include #include #include void main() { cout << "please input the lattice parameter L:\n"; // this prompts the user for inputs cin >> L; cout << "please input the site occupancy probability:\n"; float psite; cin >> psite; cout << "please input the bonding probability:\n"; cin >> pbond; cout << "please input the number of PNIPAAm segments per molecule:\n"; short CN; cin >> CN; cout << "please wait...\n" << flush; sample.InitLattice(); // this initializes the lattice srand((unsigned)time(NULL)); long rcluscount=0,ncluscount=0; float montecarlo; Site *thissite; for (k=0;k