Changeset 5eb05a
- Timestamp:
- May 26, 2008, 10:52:00 AM (17 years ago)
- Children:
- 71dc4e
- Parents:
- ccd028
- Location:
- molecuilder/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/builder.cpp
rccd028 r5eb05a 931 931 cout << Verbose(0) << "Creating connection matrix..." << endl; 932 932 start = clock(); 933 mol->CreateAdjacencyList((ofstream *)&cout, atof(argv[argptr++]) );933 mol->CreateAdjacencyList((ofstream *)&cout, atof(argv[argptr++]), configuration.GetIsAngstroem()); 934 934 cout << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl; 935 935 if (mol->first->next != mol->last) { … … 1116 1116 } 1117 1117 if (mol->first->next != mol->last) // if connect matrix is present already, redo it 1118 mol->CreateAdjacencyList((ofstream *)&cout, mol->BondDistance );1118 mol->CreateAdjacencyList((ofstream *)&cout, mol->BondDistance, configuration.GetIsAngstroem()); 1119 1119 // free memory 1120 1120 delete[](Elements); … … 1159 1159 cin >> tmp1; 1160 1160 start = clock(); 1161 mol->CreateAdjacencyList((ofstream *)&cout, tmp1 );1161 mol->CreateAdjacencyList((ofstream *)&cout, tmp1, configuration.GetIsAngstroem()); 1162 1162 //mol->CreateListOfBondsPerAtom((ofstream *)&cout); 1163 1163 Subgraphs = mol->DepthFirstSearchAnalysis((ofstream *)&cout, false, MinimumRingSize); -
molecuilder/src/molecules.cpp
rccd028 r5eb05a 1318 1318 * \param *out out stream for printing the matrix, NULL if no output 1319 1319 * \param bonddistance length of linked cells (i.e. maximum minimal length checked) 1320 */ 1321 void molecule::CreateAdjacencyList(ofstream *out, double bonddistance) 1320 * \param IsAngstroem whether coordinate system is gauged to Angstroem or Bohr radii 1321 */ 1322 void molecule::CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem) 1322 1323 { 1323 1324 atom *Walker = NULL, *OtherWalker = NULL; … … 1329 1330 vector x; 1330 1331 1331 BondDistance = bonddistance; 1332 BondDistance = bonddistance; // * ((IsAngstroem) ? 1. : 1./AtomicLengthToAngstroem); 1332 1333 *out << Verbose(0) << "Begin of CreateAdjacencyList." << endl; 1333 1334 // remove every bond from the list … … 1407 1408 /// \todo periodic check is missing here! 1408 1409 //*out << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistance(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl; 1409 MinDistance = OtherWalker->type->CovalentRadius + Walker->type->CovalentRadius; 1410 MinDistance = OtherWalker->type->CovalentRadius + Walker->type->CovalentRadius; 1411 MinDistance *= (IsAngstroem) ? 1. : 1./AtomicLengthToAngstroem; 1410 1412 MaxDistance = MinDistance + BONDTHRESHOLD; 1411 1413 MinDistance -= BONDTHRESHOLD; … … 1414 1416 *out << Verbose(0) << "Adding Bond between " << *Walker << " and " << *OtherWalker << "." << endl; 1415 1417 AddBond(Walker->father, OtherWalker->father, 1); // also increases molecule::BondCount 1418 BondCount++; 1416 1419 } else { 1417 1420 //*out << Verbose(1) << "Not Adding: Wrong label order or distance too great." << endl; … … 1428 1431 delete(CellList[i]); 1429 1432 } 1430 Free((void **)&CellList, "molecule::CreateAdjacencyList - ** CellList"); 1431 1433 Free((void **)&CellList, "molecule::CreateAdjacencyList - ** CellList"); 1434 1432 1435 // create the adjacency list per atom 1433 1436 CreateListOfBondsPerAtom(out); -
molecuilder/src/molecules.hpp
rccd028 r5eb05a 279 279 280 280 /// Initialising routines in fragmentation 281 void CreateAdjacencyList(ofstream *out, double bonddistance );281 void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem); 282 282 void CreateListOfBondsPerAtom(ofstream *out); 283 283
Note:
See TracChangeset
for help on using the changeset viewer.