SDFileUtil
use SDFileUtil ;
use SDFileUtil qw(:all);
SDFileUtil module provides the following functions:
GenerateCmpdAtomAliasPropertyLines, GenerateCmpdAtomLine, GenerateCmpdBondLine, GenerateCmpdChargePropertyLines, GenerateCmpdCommentsLine, GenerateCmpdCountsLine, GenerateCmpdDataHeaderLabelsAndValuesLines, GenerateCmpdIsotopePropertyLines, GenerateCmpdMiscInfoLine, GenerateCmpdMolNameLine, GenerateCmpdRadicalPropertyLines, GenerateEmptyCtabBlockLines, GenerateMiscLineDateStamp, GetAllAndCommonCmpdDataHeaderLabels, GetCmpdDataHeaderLabels, GetCmpdDataHeaderLabelsAndValues, GetCmpdFragments, GetCtabLinesCount, GetInvalidAtomNumbers, GetUnknownAtoms, InternalBondOrderToMDLBondType, InternalBondStereochemistryToMDLBondStereo, InternalChargeToMDLCharge, InternalSpinMultiplicityToMDLRadical, IsCmpd2D, IsCmpd3D, MDLBondStereoToInternalBondStereochemistry, MDLBondTypeToInternalBondOrder, MDLChargeToInternalCharge, MDLRadicalToInternalSpinMultiplicity, ParseCmpdAtomAliasPropertyLine, ParseCmpdAtomLine, ParseCmpdBondLine, ParseCmpdChargePropertyLine, ParseCmpdCommentsLine, ParseCmpdCountsLine, ParseCmpdIsotopePropertyLine, ParseCmpdMiscInfoLine, ParseCmpdMolNameLine, ParseCmpdRadicalPropertyLine, ReadCmpdString, RemoveCmpdDataHeaderLabelAndValue, WashCmpd
Returns a formatted atom alias property lines corresponding to successive pairs of atom number and alias values specified by a refernce to an array. Two lines are generate for each atom number and alias value pairs: First line - A <AtomNum>; Second line:<AtomAlias>.
Returns a formatted atom data line containing all the input values.
Returns a formatted bond data line containing all the input values.
Returns a formatted M CHG property lines corresponding to successive pairs of atom number and charge values specified by a refernce to an array.
Returns a formatted comments data line.
Returns a formatted line containing all the input values. The default values of 999 and V2000 are used for PropertyCount and Version.
Returns formatted data lines containing header label and values lines corresponding to all data header labels in array reference DataHeaderLabelsRef with values in hash reference DataHeaderLabelsAndValuesRef. By default, data header labels are not sorted and correspond to the label order in array reference DataHeaderLabelsRef.
Returns a formatted M ISO property lines corresponding to successive pairs of atom number and isotope values specified by a refernce to an array.
Returns a formatted line containing specified user initial, program name, date and code. Default values are: ProgramName - MayaChem; UserInitial - NULL; Code - 2D.
Returns a formatted molecule name data line.
Returns a formatted M CHG property lines corresponding to successive pairs of atom number and multiplicity values specified by a refernce to an array.
Returns formatted lines representing empty CTAB block.
Returns date stamp for misc line.
Returns number of comopunds, a reference to an array containing all unique data header label and a reference to an array containing common data field labels for all compounds in SD file.
Returns an array containg data header labels for a compound
Returns a hash conating data header labes and values for a compound.
Figures out the number of disconnected fragments and return their values along with the atom numbers in a string delimited by new line character. Fragment data in FragmentString is sorted on based on its size.
Returns number of lines present between the 4th line and the line containg "M END".
Returns a list of values containing information about invalid atom numbers present in block or atom property lines.
Returns a list of values containing information about atoms which contain special element symbols not present in the periodic table.
Returns value of MDLBondType corresponding to InternalBondOrder.
Returns value of MDLBondStereo corresponding to InternalBondStereo using following mapping:
Returns value of MDLCharge corresponding to InternalCharge using following mapping:
Returns value of MDLRadical corresponding to InternalSpinMultiplicity. These value are equivalent.
Returns value of InternalBondType corresponding to MDLBondStereo using mapping shown for InternalBondTypeToMDLBondStereo function.
Returns 1 or 0 based on whether z-coordinate of any atom is non-zero.
Returns 1 or 0 based on whether z-coordinate of any atom is non-zero.
Returns value of InternalBondStereo corresponding to MDLBondStereo using mapping shown for InternalBondStereochemistryToMDLBondStereo function.
Returns value of InternalBondOrder corresponding to MDLBondType using mapping shown for InternalBondOrderToMDLBondType function.
Returns value of $InternalCharge corresponding to MDLCharge using mapping shown for InternalChargeToMDLCharge function.
Returns value of InternalSpinMultiplicity corresponding to MDLRadical. These value are equivalent.
Parses atom alias propery lines in CTAB generic properties block and returns an array with successive pairs of values corresponding to atom number and its alias.
Parses compound data line containing atom information and returns a list of values.
Parses compound data line containing bond information and returns a list of values.
Returns the comment string.
Parses charge propery line in CTAB generic properties block and returns an array with successive pairs of values corresponding to atom number and its charge.
Returns a list of values containing count information.
Returns a list of values containing miscellaneous information.
Parses isotopic propery line in CTAB generic properties block and returns an array with successive pairs of values corresponding to atom number and absolute mass of atom isotope.
Returns a string containing molecule name.
Parses radical propery line in CTAB generic properties block and returns an array with successive pairs of values corresponding to atom number and radical number value.
Returns a NewCmpdString after removing DataHeaderLabel along with its value from CmpdString.
Returns a string containing all the data lines for the next available compound in an already open file indicated by SDFILEHANDLE. A NULL string is returned on EOF.
Figures out the number of disconnected fragments and return their values along with the atom numbers in a string delimited by new line character. Fragment data in FragmentString is sorted on based on its size.
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.