Changeset 5eb05a for molecuilder/src/molecules.cpp
- Timestamp:
- May 26, 2008, 10:52:00 AM (17 years ago)
- Children:
- 71dc4e
- Parents:
- ccd028
- File:
-
- 1 edited
-
molecuilder/src/molecules.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.
