Skip to content

Commit

Permalink
add comment docs about iupac name
Browse files Browse the repository at this point in the history
  • Loading branch information
xieguigang committed Dec 5, 2024
1 parent afc7979 commit 226cbeb
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/metadb/Massbank/MetaLib/Models/CrossReference/Xref.vb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ Namespace MetaLib.CrossReference

''' <summary>
''' The database cross reference set of a specific metabolite object.
''' (对某一个物质在数据库之间的相互引用编号)
''' </summary>
''' <remarks>
''' (对某一个物质在数据库之间的相互引用编号)
''' </remarks>
Public Class xref

''' <summary>
Expand Down
37 changes: 37 additions & 0 deletions src/metadb/Massbank/MetaLib/Models/MetaInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,32 @@ Namespace MetaLib.Models
<MessagePackMember(2)> <XmlAttribute> Public Property exact_mass As Double Implements IExactMassProvider.ExactMass

<MessagePackMember(3)> Public Property name As String Implements ICompoundNameProvider.CommonName

''' <summary>
''' IUPAC name refers to the systematic name given to a chemical compound according to the rules and
''' guidelines established by the International Union of Pure and Applied Chemistry (IUPAC). IUPAC is
''' an international organization that aims to advance the field of chemistry by developing standards
''' and nomenclature for chemicals.
'''
''' The IUPAC name of a compound provides a unique and unambiguous identifier for that compound, which
''' is essential for clear communication among chemists and other scientists. These names are based
''' on a set of systematic rules that take into account the structure and composition of the compound.
'''
''' For example, the IUPAC name for the common sugar glucose is (2R,3S,4R,5R)-2,3,4,5,6-pentahydroxyhexanal.
''' This name describes the specific arrangement of atoms and functional groups in the glucose molecule.
'''
''' IUPAC names are particularly important for complex organic compounds, where common names can be
''' confusing or non-existent. They are widely used in scientific literature, patents, and other
''' technical documents related to chemistry.
''' </summary>
''' <returns></returns>
<MessagePackMember(4)> Public Property IUPACName As String
<MessagePackMember(5)> Public Property description As String

''' <summary>
''' the synonym of current metabolite, multiple names in different languages maybe contains inside this data names pool
''' </summary>
''' <returns></returns>
<XmlElement>
<MessagePackMember(6)> Public Property synonym As String()

Expand All @@ -104,6 +128,15 @@ Namespace MetaLib.Models
''' <returns></returns>
<MessagePackMember(7)> Public Property xref As xref

''' <summary>
''' get database cross reference id by database name
''' </summary>
''' <param name="field">
''' the database name
''' </param>
''' <returns>
''' db_xref
''' </returns>
Default Public ReadOnly Property GetXrefId(field As String) As String
Get
Dim arg As xref = xref
Expand All @@ -128,6 +161,10 @@ Namespace MetaLib.Models
End Get
End Property

''' <summary>
''' display the name for debug view
''' </summary>
''' <returns></returns>
<MethodImpl(MethodImplOptions.AggressiveInlining)>
Public Overrides Function ToString() As String
Return name
Expand Down
15 changes: 12 additions & 3 deletions src/metadb/Massbank/MetaLib/RefMet.vb
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,21 @@ Namespace MetaLib
''' Some notes pertaining To different metabolite classes are outlined below.
''' </remarks>
Public Class RefMet : Implements IReadOnlyId, IExactMassProvider, ICompoundNameProvider, IFormulaProvider, INamedValue

Public Property refmet_id As String
Public Property refmet_name As String Implements IReadOnlyId.Identity, ICompoundNameProvider.CommonName, INamedValue.Key
Public Property super_class As String
Public Property main_class As String
Public Property sub_class As String
Public Property formula As String Implements IFormulaProvider.Formula
Public Property exactmass As Double Implements IExactMassProvider.ExactMass
Public Property pubchem_cid As String
Public Property chebi_id As String
Public Property hmdb_id As String
Public Property lipidmaps_id As String
Public Property kegg_id As String

Public Property inchi_key As String
Public Property smiles As String
Public Property pubchem_cid As String

Public Overrides Function ToString() As String
Return refmet_name
Expand All @@ -117,7 +122,11 @@ Namespace MetaLib
Public Function CreateReference() As xref
Return New xref With {
.pubchem = pubchem_cid,
.SMILES = smiles
.SMILES = smiles,
.chebi = "ChEBI:" & chebi_id,
.HMDB = hmdb_id,
.lipidmaps = lipidmaps_id,
.KEGG = kegg_id
}
End Function

Expand Down

0 comments on commit 226cbeb

Please sign in to comment.