Map<Integer,Integer> hash = new HashMap<Integer,Integer>(); hash.put(0, rgp.getGroup()==null?null:rgp.getGroup().hashCode()); hash.put(1, rgp.getFirstAttachmentPoint()==null?null:rgp.getFirstAttachmentPoint().hashCode()); hash.put(2, rgp.getSecondAttachmentPoint()==null?null:rgp.getSecondAttachmentPoint().hashCode()); rgrpHash.put(rgp.hashCode(),hash);
redoRGroupApo= new HashMap <RGroup,Map<Integer,IAtom>>(); HashMap<Integer,IAtom> map = new HashMap<Integer,IAtom>(); map.put(1, rgrp.getFirstAttachmentPoint()); map.put(2, rgrp.getSecondAttachmentPoint()); redoRGroupApo.put(rgrp,map);
(rgpList.get(i).getFirstAttachmentPoint()!=null && rgpList.get(i).getFirstAttachmentPoint().equals(movedAtom)))
IAtom firstAttachmentPoint = rgroup.getFirstAttachmentPoint(); IAtom secondAttachmentPoint = rgroup.getSecondAttachmentPoint(); int apoCount = 0;
if(rgrp.getGroup()==ac) { acDetachedFromRGroup=false; if(ac.contains(rgrp.getFirstAttachmentPoint())) labelApoAtoms(rgrp.getFirstAttachmentPoint(),diagram,APO1_LABEL,ac,jcpModel); if (ac.contains(rgrp.getSecondAttachmentPoint())) labelApoAtoms(rgrp.getSecondAttachmentPoint(),diagram,APO2_LABEL,ac,jcpModel);
IAtom subsAt = null; if (apo == 0) subsAt = substitute.getFirstAttachmentPoint(); else subsAt = substitute.getSecondAttachmentPoint(); && substitute.getFirstAttachmentPoint() != null && substitute.getFirstAttachmentPoint().getPoint2d() != null) { Point2d pointR = rAtom.getPoint2d(); Point2d pointC = substitute.getFirstAttachmentPoint().getPoint2d(); double xDiff = pointC.x - pointR.x; double yDiff = pointC.y - pointR.y;
existingRGroupApo= new HashMap <RGroup,Map<Integer,IAtom>>(); HashMap<Integer,IAtom> map = new HashMap<Integer,IAtom>(); map.put(1, rgrp.getFirstAttachmentPoint()); map.put(2, rgrp.getSecondAttachmentPoint()); existingRGroupApo.put(rgrp,map);
Assert.assertEquals(rGroups.get(0).getFirstAttachmentPoint(), null); Assert.assertEquals(rGroups.get(0).getSecondAttachmentPoint(), null); Assert.assertEquals(rGroups.get(1).getFirstAttachmentPoint(), null); Assert.assertEquals(rGroups.get(1).getSecondAttachmentPoint(), null);
Assert.assertEquals(rGroups.get(0).getFirstAttachmentPoint().getSymbol(), "N"); Assert.assertEquals(rGroups.get(1).getFirstAttachmentPoint().getSymbol(), "O"); Assert.assertEquals(rGroups.get(2).getFirstAttachmentPoint().getSymbol(), "S");
Assert.assertEquals(rGroups.get(0).getFirstAttachmentPoint().getSymbol(), "Pt"); Assert.assertEquals(rGroups.get(0).getSecondAttachmentPoint(), null);