Adun  0.83
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
ULFramework
Collaboration diagram for Functions:
NSDictionary * ULDivideCombinedMetadataByDomain (NSDictionary *combinedMetadata)
BOOL ULPDBNameRequiresPadding (NSString *aString)
id ULConvertDataSourceToPDBStructure (id dataSource)
id ULConvertDataSourceToPDBStructure2 (id dataSource, AdDataMatrix *elementConfiguration)
void ULWriteStructureToFile (id structure, NSString *file)
NSString * ULTimeRepresentationForNumber (int number)
NSString * ULConvertTimeIntervalToString (NSTimeInterval interval)
void ULSendProgressUpdateNotification (id object, NSString *notificationName, int completedSteps, int totalSteps, NSString *message)
AdDataSourceULCreateDataSourceFromSimulation (AdSimulationData *data, id system, int checkpoint)

Detailed Description


Function Documentation

id ULConvertDataSourceToPDBStructure ( id  dataSource)

Converts the data source to a moltalk structure object

Note:
Assumes the data source represents a molecule.
id ULConvertDataSourceToPDBStructure2 ( id  dataSource,
AdDataMatrix elementConfiguration 
)

As ULConvertDataSourceToPDBStructure but uses elementConfiguration instead of the data sources configuration. Raises an NSInvalidArgumentException if elementConfiguration does not have the same number of row as elements in dataSource

NSString* ULConvertTimeIntervalToString ( NSTimeInterval  interval)

Converts a time interval in seconds to a string with format "Hours:Minutes:Seconds". Sub second values are not converted.

AdDataSource* ULCreateDataSourceFromSimulation ( AdSimulationData data,
id  system,
int  checkpoint 
)

Returns a new data source creating using the coordinates of system at checkpoint of the simulation represented by data along with the data source of system at that point i.e. topology and composition changes during the simulation are taken into account. The input and output references for the new data source are created and a copy of the ForceField metadata key of systems data source is added. Raises an NSInvalidArgumentException if checkpoint is greater than the number of trajectory checkpoints or less than 0. Raises an NSInvalidArgumentException if system is not one of the systems in data. Does nothing is data or system are nil.

Todo:
The check that system is in data is not implemented. Need to add containsSystem: method to AdSystemCollection.
NSDictionary* ULDivideCombinedMetadataByDomain ( NSDictionary *  combinedMetadata)

Temporary function. Attempts to convert the dictionary returned by combinedMetadata (AdModelObject) into to the dictionary that would be returned by metadata (AdModelObject). This involves dividing the keys in combinedMetadata into domains.

However there are only certain keys whose domains are defined - the property domain keys, User, Annotationsm and Keywords in User domain, and Schema and Database in System domain. Hence any keys added beyond these cannot be uniquely assigned to a domain. This function knows the key ULDatabaseClientName is added by ULDatabaseInterface as a volatile key so this is added to the volatile domain if present. All other new keys are assumed to be in the system domain.

Note:
This function is currently necessary because ULDatabaseInterface returns metadata in the combined format whereas it is more useful in the divided format ( and this format is now required for objectMetadataForType: (ULPasteboardDataSource-p)).
BOOL ULPDBNameRequiresPadding ( NSString *  aString)

Checks if name, which is a pdb id should be padded to give the correct alignment for the atom name field in a pdb.

Note:
The following atoms will always be misaligned Calcium, Mercury, Iron, Cadmium. (CA, HG, PB, CD). This is because they cannot be distinguished from Alpha Carbon, Delta Carbon, Gamma Hydrogen & Beta Phosphorous and the latter always take precedence.
void ULSendProgressUpdateNotification ( id  object,
NSString *  notificationName,
int  completedSteps,
int  totalSteps,
NSString *  message 
)

Post an notification of type notificationName from object whose user info dictionary contains keys which are understood by ULProgressPanel. i.e. if a ULProgressPanel is set to observe notification from object then it will update its graphical state based in the information in the info dictionary.

Parameters:
objectThe object whose sending the notification.
notificationNameThe name of the notification to send.
completedStepsThe number of steps completed so far.
Thetotal number of steps.
Themessage to display
NSString* ULTimeRepresentationForNumber ( int  number)

Converts number into a string suitable for use in a standard time string eg. 12:24:09. 0 is converted to "00" and numbers less than 10 to "0x". Other numbers are left as they are.

void ULWriteStructureToFile ( id  structure,
NSString *  file 
)

Writes structure to file.