Changeset 606dfb for molecuilder/src/molecules.cpp
- Timestamp:
- Sep 28, 2009, 6:41:52 PM (16 years ago)
- Children:
- 01e6c5
- Parents:
- 6f1551
- git-author:
- Frederik Heber <heber@…> (09/28/09 18:39:28)
- git-committer:
- Frederik Heber <heber@…> (09/28/09 18:41:52)
- File:
-
- 1 edited
-
molecuilder/src/molecules.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/molecules.cpp
r6f1551 r606dfb 662 662 { 663 663 int length = 0; 664 char *molname = strrchr(filename, '/')+sizeof(char); // search for filename without dirs 664 const char *molname = strrchr(filename, '/'); 665 if (molname != NULL) 666 molname += sizeof(char); // search for filename without dirs 667 else 668 molname = filename; // contains no slashes 665 669 char *endname = strchr(molname, '.'); 666 670 if ((endname == NULL) || (endname < molname)) … … 1562 1566 * \param endstep stating final configuration in molecule::Trajectories 1563 1567 * \param &config configuration structure 1568 * \param MapByIdentity if true we just use the identity to map atoms in start config to end config, if not we find mapping by \sa MinimiseConstrainedPotential() 1564 1569 * \return true - success in writing step files, false - error writing files or only one step in molecule::Trajectories 1565 1570 */ 1566 bool molecule::LinearInterpolationBetweenConfiguration(ofstream *out, int startstep, int endstep, const char *prefix, config &configuration )1571 bool molecule::LinearInterpolationBetweenConfiguration(ofstream *out, int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity) 1567 1572 { 1568 1573 molecule *mol = NULL; … … 1573 1578 atom **PermutationMap = NULL; 1574 1579 atom *Walker = NULL, *Sprinter = NULL; 1575 MinimiseConstrainedPotential(out, PermutationMap, startstep, endstep, configuration.GetIsAngstroem()); 1580 if (!MapByIdentity) 1581 MinimiseConstrainedPotential(out, PermutationMap, startstep, endstep, configuration.GetIsAngstroem()); 1582 else { 1583 PermutationMap = (atom **) Malloc(AtomCount*sizeof(atom *), "molecule::LinearInterpolationBetweenConfiguration: **PermutationMap"); 1584 Walker = start; 1585 while (Walker->next != end) { 1586 Walker = Walker->next; 1587 PermutationMap[Walker->nr] = Walker; // always pick target with the smallest distance 1588 } 1589 } 1576 1590 1577 1591 // check whether we have sufficient space in Trajectories for each atom
Note:
See TracChangeset
for help on using the changeset viewer.
