<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2011 Peter Murray-Rust et. al.

       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

           http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.

-->

<molecule id="polystyreneRandom" 
    title = "polystyrene of random length" 
    convention="cml:PML-basic"
	xmlns:g="http://www.xml-cml.org/mols/geom1"
	xmlns="http://www.xml-cml.org/schema">
		<!--  polystyrene -->
		<fragment>
			<molecule ref="g:dummy"/>
			<fragmentList countExpression="*(3)">
				<join order="1" moleculeRefs2="PARENT NEXT"
					atomRefs2="r1 r1">
					<torsion>180</torsion>
				</join>
				<fragment>
					<molecule ref="g:ch"/>				
					<fragmentList>
						<join order="1" moleculeRefs2="PARENT NEXT"
							atomRefs2="r3 r1">
	 				<torsion>90</torsion>
						</join>
						<fragment>
							<molecule ref="g:benzene"/>				
						</fragment>
					</fragmentList>
	  		    </fragment>
				<join atomRefs2="r2 r2" moleculeRefs2="PREVIOUS NEXT">
					<torsion>60</torsion>
				</join>
				<fragment>
					<molecule ref="g:ch2"/>
					<fragmentList countExpression="*(3)">
						<join order="1" moleculeRefs2="PARENT NEXT"
							atomRefs2="r1 r1">
							<torsion>180</torsion>
						</join>
						<fragment>
							<molecule ref="g:po"/>				
			  		    </fragment>
						<join order="1" moleculeRefs2="PREVIOUS NEXT"
							atomRefs2="r2 r1">
							<torsion>180</torsion>
						</join>
						<fragment>
							<molecule ref="g:po"/>				
			  		    </fragment>
					</fragmentList>
				</fragment>
		    </fragmentList>
		</fragment>
	</molecule>
