public FingerprintChemHasseNode(string StrMolecule, HasseNodeTypes ElementType, string debugInfo) : base(ElementType, debugInfo) { ChemObject = new IndigoChemistry(); if (ElementType == HasseNodeTypes.ROOT) { this.keystring = "0"; } else if (Convert.ToBoolean(ElementType & HasseNodeTypes.FRAGMENT)) // is fragment { // molecule = null; hFingerprint = ChemObject.GetEmptyHasseFingerPrint(); hFingerprint.FromHex(StrMolecule); base.size = hFingerprint.bitCount; this.keystring = StrMolecule; return; } else { ChemObject.InitMolecule(StrMolecule); this.keystring = ChemObject.keystr; _isvalid = ChemObject.ChemistryIsValid; hFingerprint = ChemObject.GetHasseFingerPrint(); base.size = hFingerprint.bitCount; } }
public bool HasNodeType(HasseNodeTypes NodeTypeToTestFor) { // use bitwise AND to see if bit of type in question is set int tst = (int)(this.NodeType & NodeTypeToTestFor); return(tst > 0); }
public GraphNode(Subject _subject, HasseNodeTypes ElementType = HasseNodeTypes.REAL, string debugInfo = "") : base(ElementType, debugInfo) { ResidualAtomicRITEs = null; AtomicRITEsAdded = false; subject = _subject; keystring = _subject.ToString(); size = 100; }
public HasseNode(HasseNodeTypes Type, string debugInfo) { counterForID += 1; ID = counterForID; this.NodeType = Type; if (debugInfo.Length == 0) debugInfo = ID.ToString(); this.LabelText = debugInfo; }
public HasseNode(HasseNodeTypes Type, string debugInfo) { counterForID += 1; ID = counterForID; this.NodeType = Type; if (debugInfo.Length == 0) { debugInfo = ID.ToString(); } this.LabelText = debugInfo; }
public FingerPrintChemHasseNode(IndigoChemistry mol, HasseNodeTypes ElementType, HasseNodeCollection globalElementCollection, string debugInfo) : base(ElementType, globalElementCollection, debugInfo) { if (ElementType == HasseNodeTypes.ROOT) { // molecule = null; this.keyString = ""; return; } ChemObject = mol; this.keyString = ChemObject.keystr; _isvalid = ChemObject.ChemistryIsValid; base.size = ChemObject.heavyAtomCount; }
public StringHasseNode(string s, HasseNodeTypes ElementType, string debugInfo) : base(ElementType, debugInfo) { // TODO remove this check if (s.Contains("**")) { throw new Exception("double stars"); } if (string.IsNullOrEmpty(s) && (this.NodeType != HasseNode.HasseNodeTypes.ROOT ) ) throw new Exception("new empty string"); Debug.WriteLineIf(DEBUG_NEW, " created " + s); // todo remove one of below str = s; keystring = s; base.size = s.Length; }
public ChemHasseNode(IndigoChemistry mol, HasseNodeTypes ElementType, string debugInfo) : base(ElementType, debugInfo) { if (ElementType == HasseNodeTypes.ROOT) { // molecule = null; this.keystring = "{}"; return; } ChemObject = mol; this.keystring = ChemObject.keystr; _isvalid = ChemObject.ChemistryIsValid; base.size = ChemObject.heavyAtomCount; hFingerprint = ChemObject.GetHasseFingerPrint(); }
public FingerPrintChemHasseNode(string StrMolecule, HasseNodeTypes ElementType, HasseNodeCollection globalElementCollection, string debugInfo) : base(ElementType, globalElementCollection, debugInfo) { ChemObject = new IndigoChemistry(); if (ElementType == HasseNodeTypes.ROOT) { this.keyString = "0"; } else { ChemObject.InitMolecule(StrMolecule); this.keyString = ChemObject.keystr; _isvalid = ChemObject.ChemistryIsValid; base.size = ChemObject.heavyAtomCount; } }
public ChemHasseNode(string StrMolecule, HasseNodeTypes ElementType, string debugInfo) : base(ElementType, debugInfo) { ChemObject = new IndigoChemistry(); if (ElementType == HasseNodeTypes.ROOT) { this.keystring = "{}"; } else { ChemObject.InitMolecule(StrMolecule); this.keystring = ChemObject.keystr; _isvalid = ChemObject.ChemistryIsValid; base.size = ChemObject.heavyAtomCount; hFingerprint = ChemObject.GetHasseFingerPrint(); } }
public StringHasseNode(string s, HasseNodeTypes ElementType, string debugInfo) : base(ElementType, debugInfo) { // TODO remove this check if (s.Contains("**")) { throw new Exception("double stars"); } if (string.IsNullOrEmpty(s) && (this.NodeType != HasseNode.HasseNodeTypes.ROOT)) { throw new Exception("new empty string"); } Debug.WriteLineIf(DEBUG_NEW, " created " + s); // todo remove one of below str = s; keystring = s; base.size = s.Length; }
public bool HasNodeType(HasseNodeTypes NodeTypeToTestFor) { // use bitwise AND to see if bit of type in question is set int tst = (int)(this.NodeType & NodeTypeToTestFor); return (tst > 0); }
public void AddNodeType(HasseNodeTypes NewNodeType) { /*set the bit corresponding to NewNodeType */ this.NodeType = this.NodeType | NewNodeType; }