-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for reading Desmond DTR (Anton) trajectories (#796)
* DRR - Add the DTR plugin from VMD * DRR - Comment out vmd-specific includes * DRR - Rename since likely will want dms support as well * DRR - DMS plugin from vmd * DRR - Update README * DRR - Plugin is really from VMD * DRR - Add more files from VMD plugin framework to get dtr plugin to comple properly without too much modification * DRR - Restore original includes except for the byte swap routines; use the cpptraj versions for those * DRR - Update README * DRR - Initial version of TrajectoryIO class for DTR * DRR - Update dependencies * DRR - Function to determine file or directory * DRR - Try adding automatic ID * DRR - Add DTR to TrajectoryFile * DRR - Start adding memory allocation, deallocation. Use forward declare * DRR - Start trajectory setup * DRR - Try to return number of frames * DRR - Use version of FindDepend from clusterrevamp that can handle different directory levels * DRR - Follow cpptraj naming convention * DRR - Update dependencies * DRR - Fix init check, add some debug info * DRR - Make it easier to set box info from 6 floats. Finish coord and box read. * DRR - Refactor reading of mol2 files for topologies since e.g. sometimes VMD writes mol2s without type names * DRR - Hide debug info * DRR - Add Time * DRR - Put the VMD plugin interface behind ifdefs * DRR - Revision bump for addition of dtr * DRR - Recognize file name clickme.dtr as desmond DTR for compat. with vmd behavior * DRR - Add DTR to read traj array * DRR - Add DTR to trajectory table * DRR - Actually read the first frame to get box info instead of guessing * DRR - Add a sanity check * DRR - Add note about VMD dtr plugin to README * DRR - Try to fix the windows build by changing ifdef * DRR - Trouble compiling DTR plugin on windows, so disable for now. * DRR - Change from NO_DTR to ENABLE_DTR; disabled unless configure is used on non-windows platform.
- Loading branch information
Showing
26 changed files
with
5,481 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "FileType.h" | ||
#include <sys/stat.h> // stat | ||
|
||
Cpptraj::File::Type Cpptraj::File::IdType(std::string const& filenameIn) { | ||
if (filenameIn.empty()) return T_UNKNOWN; | ||
|
||
struct stat frame_stat; | ||
if (stat(filenameIn.c_str(), &frame_stat) == -1) { | ||
return T_UNKNOWN; | ||
} | ||
|
||
if ( frame_stat.st_mode & S_IFDIR ) { | ||
return T_DIR; | ||
} else if ( frame_stat.st_mode & S_IFREG ) { | ||
return T_FILE; | ||
} | ||
return T_UNKNOWN; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef INC_FILETYPE_H | ||
#define INC_FILETYPE_H | ||
#include <string> | ||
namespace Cpptraj { | ||
namespace File { | ||
enum Type { T_FILE = 0, T_DIR, T_UNKNOWN }; | ||
/// \return File type | ||
Type IdType(std::string const&); | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.