Class CoordinateInventor


  • public class CoordinateInventor
    extends java.lang.Object
    • Constructor Detail

      • CoordinateInventor

        public CoordinateInventor()
        Creates an CoordinateInventor, which removes unneeded hydrogen atoms and creates new atom coordinates for all(!) atoms. This constructor creates a CoordinateInventor that uses templates of the InventorDefaultTemplateList to create 3D-projection derived coordinates for polycyclic structures from these templates (adamantanes, cubane, etc.).
      • CoordinateInventor

        public CoordinateInventor​(int mode)
        Creates an CoordinateInventor, which removes unneeded hydrogens, if mode flags include MODE_REMOVE_HYDROGEN. If mode includes MODE_KEEP_MARKED_ATOM_COORDS, then marked atoms keep their coordinates. If mode includes MODE_PREFER_MARKED_ATOM_COORDS, then coordinates of marked atoms are changed only, if perfect coordinates are not possible without. Unless mode includes MODE_SKIP_DEFAULT_TEMPLATES, the CoordinateInventor uses templates of the InventorDefaultTemplateList to create 3D-projection derived coordinates for polycyclic structures from these templates (adamantanes, cubane, etc.).
        Parameters:
        mode -
    • Method Detail

      • setRandomSeed

        public void setRandomSeed​(long seed)
      • setCustomTemplateList

        public void setCustomTemplateList​(java.util.List<InventorTemplate> templateList)
        A custom template list contains substructures with predefined atom coordinates. When such a list is provided, and if a molecules contains one of the list's substructures, then the matching atoms will receive the relative atom coordinates of the provided template, unless the substructure shares two or more atoms with another earlier found template or if mode is MODE_????_MARKED_ATOM_COORDS and the substructure match contains two or more non-marked (and therefore untouchable) atoms. If a template substructure contains an E- or Z- double bound, then the query feature 'match EZ-parity' should be set.
        Parameters:
        templateList -
      • invent

        public void invent​(StereoMolecule mol)
        Creates new atom 2D-coordinates for a molecule or a part of a molecule. Coordinates will correctly reflect E/Z double bond parities, unless the double bond is in a small ring. If atom parities are available, this call is typically followed by calling mol.setStereoBondsFromParity(); Unneeded explicit hydrogens are removed, if mode includes MODE_REMOVE_HYDROGEN. The relative orientation of all marked atoms is retained, if mode includes MODE_KEEP_MARKED_ATOM_COORDS. The relative orientation of all marked atoms is changed as last resort only, if mode includes MODE_PREFER_MARKED_ATOM_COORDS. If setTemplateList() was called, then any substructures matching any of the templates will be shown with the relative atom orientation provided with the template. If many molecule's coordinates are invented with templates, then you should also provide the molecules' fragment fingerprint to speed up template search using invent(mol, ffp).
        Parameters:
        mol - the molecule that gets new 2D coordinates in place
      • invent

        public void invent​(StereoMolecule mol,
                           long[] ffp)
        Creates new atom 2D-coordinates for a molecule or a part of a molecule. Typically, the molecule has defined TH- and EZ-parities (even if unknown or none), which were not calculated, but taken from a SMILES or from an IDCode. In these cases setParitiesValid() should have been called to indicate that a parity calculation is not needed and even would destroy given parities. New coordinates will correctly reflect E/Z double bond parities, unless the double bond is in a small ring. If atom parities are available, this call is typically followed by calling mol.setStereoBondsFromParity(); Unneeded explicit hydrogens are removed, if mode includes MODE_REMOVE_HYDROGEN. The relative orientation of all marked atoms is retained, if mode includes MODE_KEEP_MARKED_ATOM_COORDS. The relative orientation of all marked atoms is changed as last resort only, if mode includes MODE_PREFER_MARKED_ATOM_COORDS. If setTemplateList() was called, then any substructures matching any of the templates will be shown with the relative atom orientation provided with the template. If many molecule's coordinates are invented with templates, then you should also provide the molecules' fragment fingerprint to speed up template search.
        Parameters:
        mol - the molecule that gets new 2D coordinates in place
      • getCustomTemplateAtomMask

        public boolean[] getCustomTemplateAtomMask()