A Maryland man with a lengthy criminal record is accused of attacking a woman inside a laboratory at the National Institutes of Health in Bethesda.