public Model createNarfModelFromAB(String anMid, NucleicAcid aNucleicAcid, List<Cycle<Nucleotide, InteractionEdge>> acycleList){
		boolean basepaironly = true;
		Random r_i = new Random();
		int rand_i = r_i.nextInt()+1;
		Model rm = ModelFactory.createDefaultModel();
		//add mcb computation resource
		Resource mcb_computation = rm.createResource(
				Vocab.narf_resource + CycleSerializer.MD5("mcb_computation"+rand_i));
		//type it
		mcb_computation.addProperty(Vocab.rdftype, Vocab.narf_mcb_computation);
		rm.add(Vocab.narf_mcb_computation, Vocab.rdftype, Vocab.rdfs_class);
		mcb_computation.addProperty(Vocab.rdftype, Vocab.named_individual);
		//add a software resource
		Resource sw_res = rm.createResource(Vocab.narf_resource+CycleSerializer.MD5("software"+rand_i));
		sw_res.addProperty(Vocab.rdftype, Vocab.narf_software);
		rm.add(Vocab.narf_software, Vocab.rdftype, Vocab.rdfs_class);
		sw_res.addProperty(Vocab.rdftype, Vocab.named_individual);		
		//add a mcb resource
		Resource mcb_res = rm.createResource(Vocab.narf_resource+CycleSerializer.MD5("mcb"+rand_i));
		mcb_res.addProperty(Vocab.rdftype, Vocab.narf_mcb);
		rm.add(Vocab.narf_mcb, Vocab.rdftype, Vocab.rdfs_class);
		mcb_res.addProperty(Vocab.rdftype, Vocab.named_individual);	
		mcb_res.addLiteral(Vocab.rdfslabel, "Minimum Cycle Basis");
		//connect them back to the mcb_computation
		mcb_computation.addProperty(Vocab.has_attribute, sw_res);
		mcb_computation.addProperty(Vocab.has_attribute, mcb_res);
		
		//create a resource for the pdb_structure
		Resource pdb_struct_resource = rm.createResource("http://freebase.com"+anMid);
		mcb_res.addProperty(Vocab.derived_from, pdb_struct_resource);		
		
		for (Cycle<Nucleotide, InteractionEdge> acyc : acycleList) {
			Random rp = new Random();
			int randp = rp.nextInt() + 1;
			// create a cycle resource
			Resource cycleRes = rm.createResource(Vocab.narf_resource
					+ CycleSerializer.MD5(acyc.toString()+anMid));
			// type it as a cycle
			cycleRes.addProperty(Vocab.rdftype, Vocab.narf_cycle);
			rm.add(Vocab.narf_cycle, Vocab.rdftype, Vocab.rdfs_class);
			cycleRes.addProperty(Vocab.rdftype, Vocab.named_individual);
			mcb_res.addProperty(Vocab.has_member, cycleRes);
			
			// add a label
			String lbl = "Cycle found in AptamerBase: " + anMid + " of size: "
					+ acyc.size();
			cycleRes.addLiteral(Vocab.rdfslabel, lbl);
			
			//add 1st degree neighbour cycle set
			//all the cycles that share one or more vertices with acyc
			List<Cycle<Nucleotide, InteractionEdge>> firstDegNeigh = aNucleicAcid.findMCBNeighbours(acyc);
			if(firstDegNeigh.size()>0){
				String r = "r"+randp;
				Resource firstDegCNS = rm.createResource(Vocab.narf_resource+CycleSerializer.MD5(r));
				String lb = "First degree cycle neighbourset";
				//add a label
				firstDegCNS.addLiteral(Vocab.rdfslabel, lb);
				//type it as a 1st degree neighbour cycle set
				firstDegCNS.addProperty(Vocab.rdftype, Vocab.narf_firstDegreeCycleNeighbourSet);
				rm.add(Vocab.narf_firstDegreeCycleNeighbourSet, Vocab.rdftype, Vocab.rdfs_class);
				firstDegCNS.addProperty(Vocab.rdftype, Vocab.named_individual);
				cycleRes.addProperty(Vocab.has_attribute, firstDegCNS);
				//now iterate over the neighbours
				for (Cycle<Nucleotide, InteractionEdge> an : firstDegNeigh) {
					//create a resource for each
					Resource an_res = rm.createResource(Vocab.narf_resource+CycleSerializer.MD5(an.toString()+anMid));
					//attach them to firstDegCNS using hasmember
					firstDegCNS.addProperty(Vocab.has_member, an_res);
				}
			}
			
			// add the size attribute
			Resource sizeRes = rm.createResource(Vocab.narf_resource
					+ CycleSerializer.MD5("size" + randp));
			// type it as a size
			sizeRes.addProperty(Vocab.rdftype, Vocab.narf_cycle_size);
			rm.add(Vocab.narf_cycle_size, Vocab.rdftype, Vocab.rdfs_class);
			sizeRes.addProperty(Vocab.rdftype, Vocab.named_individual);
			//add a label
			String l = "Cycle size";
			sizeRes.addLiteral(Vocab.rdfslabel, l);
			// add the value
			sizeRes.addLiteral(Vocab.has_value, (int) acyc.size());
			// connect the sizeRes to the cycleRes
			cycleRes.addProperty(Vocab.has_attribute, sizeRes);
			
			//create a gccontent res System.out.println(CycleHelper.computeCycleGCContent(acyc));
			Resource gcCont = rm.createResource(Vocab.narf_resource+CycleSerializer.MD5("gcContent"+randp+acyc.hashCode()));
			gcCont.addProperty(Vocab.rdftype, Vocab.narf_gc_content);
			rm.add(Vocab.narf_gc_content, Vocab.rdftype, Vocab.rdfs_class);
			//add a label
			String l2 = "Cycle gc content";
			gcCont.addLiteral(Vocab.rdfslabel, l2);
			gcCont.addProperty(Vocab.rdftype, Vocab.named_individual);
			double gc_cont =  CycleHelper.computeCycleGCContent(acyc);
			gcCont.addLiteral(Vocab.has_value,gc_cont);
			cycleRes.addProperty(Vocab.has_attribute, gcCont);
			
			if(basepaironly){
				Resource lvl_1 = rm.createResource(Vocab.narf_resource+CycleSerializer.MD5("lvl_1"+randp));
				lvl_1.addProperty(Vocab.rdftype, Vocab.narf_cycle_profile_level_1);
				rm.add(Vocab.narf_cycle_profile_level_1, Vocab.rdftype, Vocab.rdfs_class);
				lvl_1.addProperty(Vocab.rdftype, Vocab.named_individual);
				//add a label
				String l3 = "Cycle profile level 1 ";
				lvl_1.addLiteral(Vocab.rdfslabel, l3);
				//get the level 1 normalized version of this string
				String lvl_1_str = CycleHelper.findMinmalNormalization(aNucleicAcid, acyc, true).toString();
				lvl_1.addLiteral(Vocab.has_value,"#"+lvl_1_str);
				lvl_1.addLiteral(Vocab.hasMD5,CycleSerializer.MD5(lvl_1_str));
				cycleRes.addProperty(Vocab.has_attribute, lvl_1);
			}
			
			
			// get the interaction edges
			List<InteractionEdge> edges = acyc.getEdgeList();
			for (InteractionEdge anEdge : edges) {
				Set<NucleotideInteraction> interactions = anEdge
						.getInteractions();
				Random ra = new Random();
				int rand = ra.nextInt() + 1;
				for (NucleotideInteraction ni : interactions) {
					if (ni instanceof BasePair) {
						
						// get the first nucleotide
						Nucleotide fN = ((BasePair) ni).getFirstNucleotide();
						Nucleotide sN = ((BasePair) ni).getSecondNucleotide();
						// create a bio2rdf resource for each nucleotide
						Resource firstNucRes = rm
								.createResource(Vocab.ab_resource + CycleSerializer.MD5(anMid
										+ "/chemicalComponent_"
										+ fN.getChainId()
										+ fN.getResiduePosition()));
						Resource secondNucRes = rm
								.createResource(Vocab.ab_resource +CycleSerializer.MD5(anMid
										+ "/chemicalComponent_"
										+ sN.getChainId()
										+ sN.getResiduePosition()));
						// type them
						firstNucRes.addProperty(Vocab.rdftype,
								Vocab.ab_residue);
						rm.add(Vocab.ab_residue, Vocab.rdftype, Vocab.rdfs_class);
						firstNucRes.addProperty(Vocab.rdftype, Vocab.named_individual);
						secondNucRes.addProperty(Vocab.rdftype,
								Vocab.ab_residue);
						secondNucRes.addProperty(Vocab.rdftype, Vocab.named_individual);
						// add these nucleotide resources as members of the
						// cycle
						cycleRes.addProperty(Vocab.has_part, firstNucRes);
						cycleRes.addProperty(Vocab.has_part, secondNucRes);
						// create a base pair resource
						Resource bpRes = rm.createResource(Vocab.narf_resource
								+ CycleSerializer.MD5(fN.toString()
										+ sN.toString()));
						// create a resource from the rnaoclass
						String rnaoClassStr = ((BasePair) ni).inferRnaOClass();
						Resource rnaoClass = rm.createResource(rnaoClassStr);
						if (rnaoClass != null) {
							// type it using the rnaoClass resource
							bpRes.addProperty(Vocab.rdftype, rnaoClass);
							rm.add(rnaoClass, Vocab.rdftype, Vocab.rdfs_class);
							bpRes.addProperty(Vocab.rdftype, Vocab.named_individual);
						}else{
							bpRes.addProperty(Vocab.rdftype, rm.createResource("http://purl.obolibrary.org/obo/RNAO_0000001"));
							bpRes.addProperty(Vocab.rdftype, Vocab.named_individual);
							rm.add(rm.createResource("http://purl.obolibrary.org/obo/RNAO_0000001"),Vocab.rdftype, Vocab.rdfs_class);
						}
						// base pair has part residues
						bpRes.addProperty(Vocab.has_part, firstNucRes);
						bpRes.addProperty(Vocab.has_part, secondNucRes);
						// add the paried with property between the residues
						firstNucRes
								.addProperty(Vocab.paired_with, secondNucRes);
						// add the base pair label
						bpRes.addLiteral(Vocab.rdfslabel,
								((BasePair) ni).toString());
						cycleRes.addProperty(Vocab.has_attribute, bpRes);

					} else if (ni instanceof PhosphodiesterBond) {
						// get the first nucleotide
						Nucleotide fN = ((PhosphodiesterBond) ni)
								.getFirstNucleotide();
						Nucleotide sN = ((PhosphodiesterBond) ni)
								.getSecondNucleotide();
						// create a bio2rdf resource for each nucleotide
						Resource firstNucRes = rm
								.createResource(Vocab.ab_resource + CycleSerializer.MD5(anMid
										+ "/chemicalComponent_"
										+ fN.getChainId()
										+ fN.getResiduePosition()));
						Resource secondNucRes = rm
								.createResource(Vocab.ab_resource + CycleSerializer.MD5(anMid
										+ "/chemicalComponent_"
										+ sN.getChainId()
										+ sN.getResiduePosition()));
						// type them
						firstNucRes.addProperty(Vocab.rdftype,
								Vocab.ab_residue);
						firstNucRes.addProperty(Vocab.rdftype, Vocab.named_individual);
						secondNucRes.addProperty(Vocab.rdftype,
								Vocab.ab_residue);
						secondNucRes.addProperty(Vocab.rdftype, Vocab.named_individual);
						// add these nucleotide resources as members of the
						// cycle
						cycleRes.addProperty(Vocab.has_part, firstNucRes);
						cycleRes.addProperty(Vocab.has_part, secondNucRes);
						// create a phosphodiesterbond resource
						Resource phdbRes = rm.createResource(Vocab.narf_resource
								+ CycleSerializer.MD5("phdb" + rand));
						// type it as a narf phdb
						phdbRes.addProperty(Vocab.rdftype,
								Vocab.narf_phosphodiester_bond);
						rm.add(rm.createResource(Vocab.narf_phosphodiester_bond), Vocab.rdftype, Vocab.rdfs_class);
						phdbRes.addProperty(Vocab.rdftype, Vocab.named_individual);
						// phosphodiester bond has part residuies
						phdbRes.addProperty(Vocab.has_part, firstNucRes);
						phdbRes.addProperty(Vocab.has_part, secondNucRes);
						// add the covalently connected to property between the
						// residues
						firstNucRes.addProperty(Vocab.covalenty_connected_to,
								secondNucRes);
						// add the phosphodiester bond label
						phdbRes.addLiteral(Vocab.rdfslabel,
								((PhosphodiesterBond) ni).toString());
						cycleRes.addProperty(Vocab.has_attribute, phdbRes);
					}
				}
			}
		}
		return rm;
	}