FingerprintsSDFileIO
use FileIO::FingerprintsSDFileIO;
use FileIO::FingerprintsSDFileIO qw(:all);
FingerprintsSDFileIO class provides the following methods:
new, GetCompoundString, GetFingerprints, GetFingerprintsString, IsFingerprintsDataValid, IsFingerprintsFileDataValid, IsFingerprintsSDFile, Next, Read, SetBitStringFormat, SetBitsOrder, SetCompoundIDMode, SetCompoundString, SetDetailLevel, SetFingerprints, SetFingerprintsString, SetFingerprintsStringMode, SetVectorStringFormat, WriteFingerprints, WriteFingerprintsString
The following methods can also be used as functions:
IsFingerprintsSDFile
FingerprintsSDFileIO class is derived from FileIO class and uses its methods to support generic file related functionality.
The fingerprints SD file format with .sdf or .sd file extensions supports two types of fingerprints string data: fingerprints bit-vectors and fingerprints vector strings. The fingerprints string data is treated as value of a fingerprints data field label in a SD file.
Example of SD file format containing fingerprints string data:
The current release of MayaChemTools supports the following types of fingerprint bit-vector and vector strings:
Using specified IOParameters names and values hash, new method creates a new object and returns a reference to a newly created FingerprintsSDFileIO object. By default, the following properties are initialized during Read mode:
During Write mode, the following properties get initialize by default:
Examples:
Returns CompoundString for current compound.
Returns FingerprintsObject generated for current compound using fingerprints bit-vector or vector string data. The fingerprints object corresponds to any of the supported fingerprints such as PathLengthFingerprints, ExtendedConnectivity, and so on.
Returns FingerprintsString for current compound.
Returns 1 or 0 based on whether FingerprintsObject is valid.
Returns 1 or 0 based on whether fingerprints file contains valid fingerprints data.
Returns 1 or 0 based on whether FileName is a SD file.
Reads next available compound fingerprints in SD file, processes the data, generates appropriate fingerprints object, and returns FingerprintsSDFileIO. The generated fingerprints object is available using method GetFingerprints.
Sets bit string Format for fingerprints bit-vector string data in a SD file and returns FingerprintsSDFileIO. Possible values for BitStringFormat: BinaryString or HexadecimalString.
Sets BitsOrder for fingerprints bit-vector string data in SD file and returns FingerprintsSDFileIO. Possible values for BitsOrder: Ascending or Descending.
Sets compound ID Mode for fingerprints bit-vector string data in a SD file and returns FingerprintsSDFileIO. Possible values for CompoundIDMode: DataField, MolName, LabelPrefix, or MolNameOrLabelPrefix.
Sets CompoundString and returns FingerprintsSDFileIO.
Sets details Level for generating diagnostics messages during SD file processing and returns FingerprintsSDFileIO. Possible values: Positive integers.
Sets FingerprintsObject for current data line and returns FingerprintsSDFileIO.
Sets FingerprintsString for current data line and returns FingerprintsSDFileIO.
Sets FingerprintsStringMode for SD file and returns FingerprintsFPFileIO. Possible values: AutoDetect, FingerprintsBitVectorString, or FingerprintsVectorString
Sets VectorStringFormat for SD file and returns FingerprintsFPFileIO. Possible values: IDsAndValuesString, IDsAndValuesPairsString, ValuesAndIDsString, ValuesAndIDsPairsString.
Writes fingerprints string generated from FingerprintsObject object and other data including CompoundID to SD file and returns FingerprintsSDFileIO.
Writes FingerprintsString and other data including CompoundID to SD file and returns FingerprintsSDFileIO.
Caveats:
FingerprintsTextFileIO.pm, FingerprintsFPFileIO.pm, SDFileIO.pm
Copyright (C) 2024 Manish Sud. All rights reserved.
This file is part of MayaChemTools.
MayaChemTools is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.