Changeset d93bb24 for molecuilder/src/builder.cpp
- Timestamp:
- Aug 4, 2009, 1:55:11 PM (16 years ago)
- Children:
- e1a46d
- Parents:
- 7aa922
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
r7aa922 rd93bb24 584 584 LinkedCell LCList(mol, 10.); 585 585 class Tesselation *TesselStruct = NULL; 586 Find_convex_border((ofstream *)&cout, mol, TesselStruct,&LCList, NULL);586 Find_convex_border((ofstream *)&cout, mol, &LCList, NULL); 587 587 double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, TesselStruct, configuration); 588 588 cout << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl; … … 1562 1562 } 1563 1563 break; 1564 case 'F': 1565 ExitFlag = 1; 1566 if (argptr+5 >=argc) { 1567 ExitFlag = 255; 1568 cerr << "Not enough or invalid arguments given for filling box with water: -F <dist_x> <dist_y> <dist_z> <randatom> <randmol> <DoRotate>" << endl; 1569 } else { 1570 SaveFlag = true; 1571 cout << Verbose(1) << "Filling Box with water molecules." << endl; 1572 // construct water molecule 1573 molecule *filler = new molecule(periode);; 1574 molecule *Filling = NULL; 1575 atom *second = NULL, *third = NULL; 1576 first = new atom(); 1577 first->type = periode->FindElement(1); 1578 first->x.Init(0.441, -0.143, 0.); 1579 filler->AddAtom(first); 1580 second = new atom(); 1581 second->type = periode->FindElement(1); 1582 second->x.Init(-0.464, 1.137, 0.0); 1583 filler->AddAtom(second); 1584 third = new atom(); 1585 third->type = periode->FindElement(8); 1586 third->x.Init(-0.464, 0.177, 0.); 1587 filler->AddAtom(third); 1588 filler->AddBond(first, third, 1); 1589 filler->AddBond(second, third, 1); 1590 // call routine 1591 double distance[NDIM]; 1592 for (int i=0;i<NDIM;i++) 1593 distance[i] = atof(argv[argptr+i]); 1594 Filling = FillBoxWithMolecule((ofstream *)&cout, molecules, filler, configuration, distance, atof(argv[argptr+3]), atof(argv[argptr+4]), atoi(argv[argptr+5])); 1595 if (Filling != NULL) { 1596 molecules->insert(Filling); 1597 } 1598 delete(filler); 1599 argptr+=6; 1600 } 1601 break; 1564 1602 case 'A': 1565 1603 ExitFlag = 1; … … 1587 1625 cout << Verbose(1) << "Using rolling ball of radius " << atof(argv[argptr]) << " and storing tecplot data in " << argv[argptr+1] << "." << endl; 1588 1626 LinkedCell LCList(mol, atof(argv[argptr])*2.); 1589 Find_non_convex_border((ofstream *)&cout, mol, & T, &LCList, argv[argptr+1], atof(argv[argptr]));1627 Find_non_convex_border((ofstream *)&cout, mol, &LCList, argv[argptr+1], atof(argv[argptr])); 1590 1628 //FindDistributionOfEllipsoids((ofstream *)&cout, &T, &LCList, N, number, filename.c_str()); 1591 1629 argptr+=2; … … 1770 1808 cout << Verbose(1) << "Converting config file from supposed old to new syntax." << endl; 1771 1809 break; 1772 case 'F':1773 1810 case 'f': 1774 1811 ExitFlag = 1; … … 1814 1851 LinkedCell LCList(mol, 10.); 1815 1852 class Tesselation *TesselStruct = NULL; 1816 Find_convex_border((ofstream *)&cout, mol, TesselStruct,&LCList, argv[argptr]);1853 Find_convex_border((ofstream *)&cout, mol, &LCList, argv[argptr]); 1817 1854 double clustervolume = VolumeOfConvexEnvelope((ofstream *)&cout, TesselStruct, &configuration); 1818 1855 cout << Verbose(0) << "The tesselated surface area is " << clustervolume << "." << endl;
Note:
See TracChangeset
for help on using the changeset viewer.