Package org.openscience.cdk.isomorphism.matchers

Examples of org.openscience.cdk.isomorphism.matchers.RGroup


          RGroupList rgrpList = rgrpQuery.getRGroupDefinitions().get(rgrpNum);
          if(rgrpList!=null) {
            existingRgroupLists.put(rgrpNum,  makeClone(rgrpList));
            List<RGroup> cleanList = new ArrayList<RGroup>();
            for (int j=0; j<rgrpList.getRGroups().size(); j++){
              RGroup subst= rgrpList.getRGroups().get(j);
              boolean remove=false;
              removeCheck:
                for(IAtom atom : molecule.atoms()) {
                  if (subst.getGroup().contains(atom)) {
                    remove=true;
                    break removeCheck;
                  }
                }
              if (!remove) {
                cleanList.add(subst);
              }
            }
            rgrpList.setRGroups(cleanList);
          }
        }

        hub.getChemModel().getMoleculeSet().addAtomContainer(molecule);
        molecule.setProperty(CDKConstants.TITLE,RGroup.makeLabel(rNum));

        RGroup rgrp = new RGroup();
        rgrp.setGroup(molecule);
        rgrpQuery.getRGroupDefinitions().get(rNum).getRGroups().add(rgrp);

        //Set default APO atoms (randomly picked) for the new substitute
        int apoCount=validRnumChoices.get(rNum);
        int apoSet=0;
        apoBreak:
          for(IAtom atom : molecule.atoms()) {
            if (apoSet==apoCount)
              break apoBreak;
            if (apoSet==0) {
              rgrp.setFirstAttachmentPoint(atom);
            }
            if (apoSet==1) {
              rgrp.setSecondAttachmentPoint(atom);
            }
            apoSet++;
          }
      }
View Full Code Here


        int rNum=itr.next();
        redoRgroupLists.put(rNum, rgrpHandler.getrGroupQuery().getRGroupDefinitions().get(rNum));
      }
    }
    if(existingRGroupApo!=null) {
      RGroup undoRGroup=existingRGroupApo.keySet().iterator().next();     
        for (Iterator<Integer> rnumItr= hub.getRGroupHandler().getrGroupQuery().getRGroupDefinitions().keySet().iterator(); rnumItr.hasNext();) {
          for (RGroup rgrp:  hub.getRGroupHandler().getrGroupQuery().getRGroupDefinitions().get(rnumItr.next()).getRGroups()) {
            if(rgrp.equals(undoRGroup)) {
                  redoRGroupApo= new HashMap <RGroup,Map<Integer,IAtom>>();
                  HashMap<Integer,IAtom> map = new HashMap<Integer,IAtom>();
View Full Code Here

        }
      }
    }

    else if (type.startsWith("setAtomApoAction")) {
      RGroup undoRGroup=existingRGroupApo.keySet().iterator().next();     
        for (Iterator<Integer> rnumItr= hub.getRGroupHandler().getrGroupQuery().getRGroupDefinitions().keySet().iterator(); rnumItr.hasNext();) {
          for (RGroup rgrp:  hub.getRGroupHandler().getrGroupQuery().getRGroupDefinitions().get(rnumItr.next()).getRGroups()) {
            if(rgrp.equals(undoRGroup)) {
              IAtom apo1=existingRGroupApo.get(undoRGroup).get(1);
              IAtom apo2=existingRGroupApo.get(undoRGroup).get(2);
View Full Code Here

          }
        }
      }
    }
    else if (type.startsWith("setAtomApoAction")) {
      RGroup redoRGroup=redoRGroupApo.keySet().iterator().next();     
        for (Iterator<Integer> rnumItr= hub.getRGroupHandler().getrGroupQuery().getRGroupDefinitions().keySet().iterator(); rnumItr.hasNext();) {
          for (RGroup rgrp:  hub.getRGroupHandler().getrGroupQuery().getRGroupDefinitions().get(rnumItr.next()).getRGroups()) {
            if(rgrp.equals(redoRGroup)) {
              IAtom apo1=redoRGroupApo.get(redoRGroup).get(1);
              IAtom apo2=redoRGroupApo.get(redoRGroup).get(2);
View Full Code Here

TOP

Related Classes of org.openscience.cdk.isomorphism.matchers.RGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.