Commit 8a5858ff authored by hrchilds's avatar hrchilds

Update from March 29, 2006

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@645 18c085ea-50e0-402c-830e-de6fd14e8384
parent 7d101a01
......@@ -156,6 +156,9 @@
# Mark C. Miller, Fri Feb 10 20:47:24 PST 2006
# Put defer_expr.py back into skip list for a few modes
#
# Brad Whitlock, Wed Mar 29 14:07:00 PST 2006
# Added ProteinDataBank.py to skip list for scalable, parallel.
#
# ----------------------------------------------------------------------------
# list of users who want email every night with the log file
......@@ -298,6 +301,7 @@ esac
# set list of tests/modes to skip
skipList="scalable,parallel:tests/databases/boxlib.py \
scalable,parallel:tests/databases/ProteinDataBank.py \
scalable,parallel:tests/hybrid/locus.py \
scalable,parallel:tests/rendering/saveformats.py \
dlb:tests/databases/global_node_ids.py \
......
This diff is collapsed.
#ifndef ATOMIC_PROPERTIES_H
#define ATOMIC_PROPERTIES_H
#include <utility_exports.h>
#define MAX_ELEMENT_NUMBER 109
#define KNOWN_AMINO_ACIDS 23
extern unsigned char aminocolors[KNOWN_AMINO_ACIDS][3];
extern unsigned char shapelycolors[KNOWN_AMINO_ACIDS][3];
extern unsigned char jmolcolors[MAX_ELEMENT_NUMBER][3];
extern unsigned char rasmolcolors[MAX_ELEMENT_NUMBER][3];
extern float atomic_radius[MAX_ELEMENT_NUMBER];
extern float covalent_radius[MAX_ELEMENT_NUMBER];
extern const char *element_names[MAX_ELEMENT_NUMBER];
extern const char *residue_names[KNOWN_AMINO_ACIDS];
int UTILITY_API ElementNameToAtomicNumber(const char *element);
int UTILITY_API ResiduenameToNumber(const char *name);
UTILITY_API const char *NumberToResiduename(int num);
int UTILITY_API NumberOfKnownResidues();
int UTILITY_API ResiduenameToAbbr(const char *name);
void UTILITY_API AddResiduename(const char *name, const char *longname);
UTILITY_API const char *ResiduenameToLongName(const char *name);
int UTILITY_API ResidueLongnameMaxlen();
#endif
#
# Copyright 2000 - 2005
# Copyright 2000 - 2006
# The Regents of the University of California.
# All rights reserved.
#
......@@ -62,6 +62,9 @@
# Brad Whitlock, Wed Feb 16 11:23:34 PDT 2005
# Added top level VisIt include.
#
# Jeremy Meredith, Thu Mar 23 10:39:47 PDT 2006
# Added AtomicProperties.
#
##############################################################################
##
......@@ -76,9 +79,10 @@ LIBS=
##
## Files...
##
SRC=BJHash.C NamingConvention.C StringHelpers.C Utility.C void_ref_ptr.C
HDR=BJHash.h NamingConvention.h StringHelpers.h Utility.h ref_ptr.h \
array_ref_ptr.h void_ref_ptr.h
SRC=AtomicProperties.C BJHash.C NamingConvention.C StringHelpers.C Utility.C\
void_ref_ptr.C
HDR=AtomicProperties.h BJHash.h NamingConvention.h StringHelpers.h Utility.h\
ref_ptr.h array_ref_ptr.h void_ref_ptr.h
OBJ=$(SRC:.C=.o)
LIB=libutility
NOT_DISTRIB=
......
This diff is collapsed.
# Copyright 2000 - 2005
# Copyright 2000 - 2006
# The Regents of the University of California.
# All rights reserved.
#
......@@ -184,6 +184,9 @@
# Hank Childs, Thu Jan 19 09:40:30 PST 2006
# Added Chombo reader.
#
# Jeremy Meredith, Wed Mar 22 13:46:20 PST 2006
# Added ProteinDataBank reader
#
##############################################################################
@SET_MAKE@
......@@ -204,8 +207,8 @@ PDB=KullLite PDB
SAF=SAF
SAMPLES=Rect Hex
REQUIRED=ANALYZE ANSYS AUXFile BOV CMAT Curve2D Dune EnSight Image Lines \
NASTRAN OVERFLOW PATRAN PLOT2D PLOT3D Point3D SAR STL Shapefile Silo \
SimV1 Spheral TFT Tecplot Vista VTK WavefrontOBJ Xmdv
NASTRAN OVERFLOW PATRAN PLOT2D PLOT3D Point3D ProteinDataBank SAR STL \
Shapefile Silo SimV1 Spheral TFT Tecplot Vista VTK WavefrontOBJ Xmdv
VISUS=ViSUS
OPTIONAL=
......
<?xml version="1.0"?>
<Plugin name="ProteinDataBank" type="database" label="ProteinDataBank" version="1.0" enabled="true" mdspecificcode="false" onlyengine="false" noengine="false" dbtype="MTSD" haswriter="false" hasoptions="true">
<Extensions>
ent
pdb
</Extensions>
<Attribute name="" purpose="" persistent="true" exportAPI="" exportInclude="">
</Attribute>
</Plugin>
#include <ProteinDataBankPluginInfo.h>
#include <avtProteinDataBankFileFormat.h>
#include <avtMTSDFileFormatInterface.h>
#include <avtGenericDatabase.h>
#include <avtProteinDataBankOptions.h>
// ****************************************************************************
// Method: ProteinDataBankCommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a ProteinDataBank database.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
DatabaseType
ProteinDataBankCommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_MTSD;
}
// ****************************************************************************
// Method: ProteinDataBankCommonPluginInfo::GetDefaultExtensions
//
// Purpose:
// Returns the default extensions for a ProteinDataBank database.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
std::vector<std::string>
ProteinDataBankCommonPluginInfo::GetDefaultExtensions()
{
std::vector<std::string> defaultExtensions;
defaultExtensions.push_back("ent");
defaultExtensions.push_back("pdb");
return defaultExtensions;
}
// ****************************************************************************
// Method: ProteinDataBankCommonPluginInfo::SetupProteinDataBankDatabase
//
// Purpose:
// Sets up a ProteinDataBank database.
//
// Arguments:
// list A list of file names.
// nList The number of timesteps in list.
// nBlocks The number of blocks in the list.
//
// Returns: A ProteinDataBank database from list.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
avtDatabase *
ProteinDataBankCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
avtMTSDFileFormat **ffl = new avtMTSDFileFormat*[nList];
for (int i = 0 ; i < nList ; i++)
{
ffl[i] = new avtProteinDataBankFileFormat(list[i], readOptions);
}
avtMTSDFileFormatInterface *inter
= new avtMTSDFileFormatInterface(ffl, nList);
return new avtGenericDatabase(inter);
}
// ****************************************************************************
// Method: ProteinDataBankCommonPluginInfo::GetReadOptions
//
// Purpose:
// Gets the read options.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
DBOptionsAttributes *
ProteinDataBankCommonPluginInfo::GetReadOptions() const
{
return GetProteinDataBankReadOptions();
}
// ****************************************************************************
// Method: ProteinDataBankCommonPluginInfo::GetWriteOptions
//
// Purpose:
// Gets the write options.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
DBOptionsAttributes *
ProteinDataBankCommonPluginInfo::GetWriteOptions() const
{
return GetProteinDataBankWriteOptions();
}
#include <ProteinDataBankPluginInfo.h>
#if defined(__APPLE__)
#define GetEngineInfo ProteinDataBank_GetEngineInfo
#endif
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the ProteinDataBank database.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
extern "C" EngineDatabasePluginInfo* GetEngineInfo()
{
return new ProteinDataBankEnginePluginInfo;
}
// ****************************************************************************
// Method: ProteinDataBankCommonPluginInfo::GetWriter
//
// Purpose:
// Sets up a ProteinDataBank writer.
//
// Returns: A ProteinDataBank writer.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
avtDatabaseWriter *
ProteinDataBankEnginePluginInfo::GetWriter(void)
{
return NULL;
}
#include <ProteinDataBankPluginInfo.h>
#if defined(__APPLE__)
#define GetMDServerInfo ProteinDataBank_GetMDServerInfo
#endif
// ****************************************************************************
// Function: GetMDServerInfo
//
// Purpose:
// Return a new MDServerPluginInfo for the ProteinDataBank database.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
extern "C" MDServerDatabasePluginInfo* GetMDServerInfo()
{
return new ProteinDataBankMDServerPluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void ProteinDataBankMDServerPluginInfo::dummy()
{
}
// ************************************************************************* //
// File: ProteinDataBankPluginInfo.C
// ************************************************************************* //
#include <ProteinDataBankPluginInfo.h>
#include <visit-config.h>
#if defined(__APPLE__)
extern "C" const char *ProteinDataBankVisItPluginVersion = VERSION;
#else
extern "C" const char *VisItPluginVersion = VERSION;
#endif
#if defined(__APPLE__)
#define GetGeneralInfo ProteinDataBank_GetGeneralInfo
#endif
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the ProteinDataBank database.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
extern "C" GeneralDatabasePluginInfo* GetGeneralInfo()
{
return new ProteinDataBankGeneralPluginInfo;
}
// ****************************************************************************
// Method: ProteinDataBankGeneralPluginInfo::GetName
//
// Purpose:
// Return the name of the database plugin.
//
// Returns: A pointer to the name of the database plugin.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
char *
ProteinDataBankGeneralPluginInfo::GetName() const
{
return "ProteinDataBank";
}
// ****************************************************************************
// Method: ProteinDataBankGeneralPluginInfo::GetVersion
//
// Purpose:
// Return the version of the database plugin.
//
// Returns: A pointer to the version of the database plugin.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
char *
ProteinDataBankGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: ProteinDataBankGeneralPluginInfo::GetID
//
// Purpose:
// Return the id of the database plugin.
//
// Returns: A pointer to the id of the database plugin.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
char *
ProteinDataBankGeneralPluginInfo::GetID() const
{
return "ProteinDataBank_1.0";
}
// ****************************************************************************
// Method: ProteinDataBankGeneralPluginInfo::EnabledByDefault
//
// Purpose:
// Return true if this plugin should be enabled by default; false otherwise.
//
// Returns: true/false
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
bool
ProteinDataBankGeneralPluginInfo::EnabledByDefault() const
{
return true;
}
// ****************************************************************************
// Method: ProteinDataBankGeneralPluginInfo::HasWriter
//
// Purpose:
// Return true if this plugin has a database writer.
//
// Returns: true/false
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// ****************************************************************************
bool
ProteinDataBankGeneralPluginInfo::HasWriter() const
{
return false;
}
// ****************************************************************************
// ProteinDataBankPluginInfo.h
// ****************************************************************************
#ifndef PROTEINDATABANK_PLUGIN_INFO_H
#define PROTEINDATABANK_PLUGIN_INFO_H
#include <DatabasePluginInfo.h>
#include <database_plugin_exports.h>
class avtDatabase;
class avtDatabaseWriter;
// ****************************************************************************
// Class: ProteinDataBankDatabasePluginInfo
//
// Purpose:
// Classes that provide all the information about the ProteinDataBank plugin.
// Portions are separated into pieces relevant to the appropriate
// components of VisIt.
//
// Programmer: js9 -- generated by xml2info
// Creation: Fri Mar 17 09:25:33 PDT 2006
//
// Modifications:
//
// ****************************************************************************
class ProteinDataBankGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
{
public:
virtual char *GetName() const;
virtual char *GetVersion() const;
virtual char *GetID() const;
virtual bool EnabledByDefault() const;
virtual bool HasWriter() const;
};
class ProteinDataBankCommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual ProteinDataBankGeneralPluginInfo
{
public:
virtual DatabaseType GetDatabaseType();
virtual std::vector<std::string> GetDefaultExtensions();
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock);
virtual DBOptionsAttributes *GetReadOptions() const;
virtual DBOptionsAttributes *GetWriteOptions() const;
};
class ProteinDataBankMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual ProteinDataBankCommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};
class ProteinDataBankEnginePluginInfo : public virtual EngineDatabasePluginInfo, public virtual ProteinDataBankCommonPluginInfo
{
public:
virtual avtDatabaseWriter *GetWriter(void);
};
#endif
This diff is collapsed.
// ************************************************************************* //
// avtProteinDataBankFileFormat.h //
// ************************************************************************* //
#ifndef AVT_ProteinDataBank_FILE_FORMAT_H
#define AVT_ProteinDataBank_FILE_FORMAT_H
#include <avtMTSDFileFormat.h>
#include <vector>
#include <map>
#include <string>
class DBOptionsAttributes;
// ****************************************************************************
// Struct: Atom
//
// Purpose:
// Encapsulates an Atom for a PDB file.
//
// Programmer: Jeremy Meredith
// Creation: March 23, 2006
//
// ****************************************************************************
struct Atom
{
int serial;
char name[5];
char altloc;
char resname[4];
char chainid;
int resseq;
char icode;
float x;
float y;
float z;
float occupancy;
float tempfactor;
char segid[5];
char element[3];
char charge[3];
int atomicnumber;
int residuenumber;
bool backbone;
Atom(const char *line);
void Print(ostream &out);
};
// ****************************************************************************
// Class: avtProteinDataBankFileFormat
//
// Purpose:
// Reads in ProteinDataBank files as a plugin to VisIt.
//
// Programmer: Jeremy Meredith
// Creation: March 23, 2006
//
// Modifications:
// Brad Whitlock, Thu Mar 23 11:45:32 PDT 2006
// Added support for PDB title information.
//
// ****************************************************************************
class avtProteinDataBankFileFormat : public avtMTSDFileFormat
{
public:
avtProteinDataBankFileFormat(const char *, DBOptionsAttributes *);
virtual ~avtProteinDataBankFileFormat() {;};
//
// This is used to return unconventional data -- ranging from material
// information to information about block connectivity.
//
// virtual void *GetAuxiliaryData(const char *var, const char *type,
// int timestep, void *args,
// DestructorFunction &);
//
//
// If you know the times and cycle numbers, overload this function.
// Otherwise, VisIt will make up some reasonable ones for you.
//
// virtual void GetCycles(std::vector<int> &);
// virtual void GetTimes(std::vector<double> &);
//
virtual int GetNTimesteps(void);
virtual const char *GetType(void) { return "ProteinDataBank"; };
virtual void FreeUpResources(void);
virtual vtkDataSet *GetMesh(int, const char *);
virtual vtkDataArray *GetVar(int, const char *);
virtual vtkDataArray *GetVectorVar(int, const char *);
protected:
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *, int);
ifstream in;
bool metadata_read;
int nmodels;
std::vector< std::vector<Atom> > allatoms;
std::vector<int> bonds[4];
std::string filename;
std::string dbTitle;
void OpenFileAtBeginning();
void ReadAllMetaData();
void ReadAtomsForModel(int);
void CreateBondsFromModel_Slow(int);
void CreateBondsFromModel_Fast(int);
};
#endif
// ************************************************************************* //
// avtProteinDataBankOptions.C //
// ************************************************************************* //
#include <avtProteinDataBankOptions.h>
#include <DBOptionsAttributes.h>
#include <string>
// ****************************************************************************
// Function: GetProteinDataBankReadOptions
//
// Purpose:
// Creates the options for ProteinDataBank readers.
//
// Important Note:
// The code below sets up empty options. If your format
// does not require read options, no modifications are
// necessary.
//
// Programmer: js9 -- generated by xml2avt
// Creation: Fri Mar 17 09:25:34 PDT 2006
//
// ****************************************************************************
DBOptionsAttributes *
GetProteinDataBankReadOptions(void)
{
DBOptionsAttributes *rv = new DBOptionsAttributes;
return rv;
/* EXAMPLE OF OPTIONS
rv->SetBool("Binary format", true);
rv->SetBool("Big Endian", false);
rv->SetEnum("Dimension", 1);
vector<string> dims;
dims.push_back("0D");
dims.push_back("1D");
dims.push_back("2D");
dims.push_back("3D");
rv->SetEnumStrings(2, dims);
rv->SetInt("Number of variables", 5);
rv->SetString("Name of auxiliary file", );
rv->SetDouble("Displacement factor", 1.0);
// When reading or writing the file, you can get the options out of this object like:
rv->GetDouble("Displacement factor");
*/
}
// ****************************************************************************
// Function: GetProteinDataBankWriteOptions
//
// Purpose:
// Creates the options for ProteinDataBank writers.
//
// Important Note:
// The code below sets up empty options. If your format
// does not require write options, no modifications are
// necessary.
//
// Programmer: js9 -- generated by xml2avt
// Creation: Fri Mar 17 09:25:34 PDT 2006
//
// ****************************************************************************
DBOptionsAttributes *
GetProteinDataBankWriteOptions(void)
{
DBOptionsAttributes *rv = new DBOptionsAttributes;
return rv;
}
// ************************************************************************* //
// avtProteinDataBankOptions.h //
// ************************************************************************* //
#ifndef AVT_ProteinDataBank_OPTIONS_H
#define AVT_ProteinDataBank_OPTIONS_H
class DBOptionsAttributes;
#include <string>
// ****************************************************************************
// Functions: avtProteinDataBankOptions
//
// Purpose:
// Creates the options for ProteinDataBank readers and/or writers.
//
// Programmer: js9 -- generated by xml2avt
// Creation: Fri Mar 17 09:25:34 PDT 2006
//
// ****************************************************************************
DBOptionsAttributes *GetProteinDataBankReadOptions(void);
DBOptionsAttributes *GetProteinDataBankWriteOptions(void);
#endif
# Copyright 2000 - 2004
# Copyright 2000 - 2006
# The Regents of the University of California.
# All rights reserved.
#
......@@ -110,7 +110,10 @@
#
# Mark C. Miller, Tue Aug 16 13:56:55 PDT 2005
# Made Truecolor plot non-optional
#